OldTwitter icon indicating copy to clipboard operation
OldTwitter copied to clipboard

Safari port for the extension

Open jxhug opened this issue 1 year ago • 10 comments

A Safari port would be great to have for this extension. Apple provides some helpful documentation going over how to do this here. I've tried myself but Twitter just idles with the extension on and I get this error: image If anybody would like to give this a shot I'd appreciate it!

jxhug avatar Jul 05 '23 00:07 jxhug

I don't have a Mac so I can't do this myself...

dimdenGD avatar Jul 05 '23 00:07 dimdenGD

Would a userscript be possible then? It'd probably be easier to make and would be just as much of a solution as an actual Safari extension.

jxhug avatar Jul 05 '23 01:07 jxhug

It's impossible to compact everything extension does into a userscript

dimdenGD avatar Jul 05 '23 01:07 dimdenGD

It's impossible to compact everything extension does into a userscript

pretty sure that it is possible to make it a userscript but it'd probably require external hosting or something

TorutheRedFox avatar Jul 10 '23 09:07 TorutheRedFox

Solution: use bootcamp, boot into windows and install the extension from there🤯🤯🤯🤯🤯🤯🤯🤯🤯🤯🤯🤯🤯🤯🤯🤯🤯🤯

emeraldsucksss avatar Jul 25 '23 12:07 emeraldsucksss

giving this a go this morning...

following along with some of the resources dev here:

  • https://developer.apple.com/documentation/safariservices/safari_web_extensions/converting_a_web_extension_for_safari
  • https://developer.apple.com/documentation/safariservices/safari_web_extensions/assessing_your_safari_web_extension_s_browser_compatibility

got the extension to load on an iPhone simulator, but only as far as the splash screen. getting the following error:

image

i believe it's due to some (or all) of these unsupported keys in the manifest:

App Name: Old Twitter Layout (2023)
App Bundle Identifier: com.github.Old-Twitter-Layout--2023-
Platform: All
Language: Swift
Warning: The following keys in your manifest.json are not supported by your current version of Safari. If these are critical to your extension, you should review your code to see if you need to make changes to support Safari:
	css
	icons
	scripting
	version
	unlimitedStorage
	default_locale
	run_at
	js
	declarativeNetRequest
	declarative_net_request
	default_icon
	service_worker
	description
	default_title
	resources
	storage
	manifest_version
	contextMenus
	name
	all_frames

dafunction avatar Oct 15 '23 16:10 dafunction

this is where it stalls: image

you can see the extension is active, though: image

image

dafunction avatar Oct 15 '23 16:10 dafunction

fwiw it does seem to work on desktop Safari using the bundled Xcode converter, however: image

didn't have to modify the manifest at all. the issues may just be limited to iOS's version of Safari, unfortunately.

dafunction avatar Oct 15 '23 21:10 dafunction

that's very weird, i couldn't get it working on desktop :( could you share the code?

jxhug avatar Oct 17 '23 01:10 jxhug

that's very weird, i couldn't get it working on desktop :( could you share the code?

if you download the latest release and run the safari-web-extension-converter command on the path it's downloaded to you should be able to build it for desktop Safari in Xcode. it's not perfect (you can see in the screenshot the counters for tweets, following, followers etc. on profiles isn't working), but it's usable if you must have the extension for Safari.

just follow the instructions here: https://developer.apple.com/documentation/safariservices/safari_web_extensions/converting_a_web_extension_for_safari

dafunction avatar Oct 17 '23 01:10 dafunction