Refined-github: Safari version

Created on 17 Feb 2016  ·  38Comments  ·  Source: sindresorhus/refined-github

Would be great to have a Safari version as well 😁

safari

Most helpful comment

Running xcrun safari-web-extension-converter on the Chrome Web Store version without any modifications seem to work at first glance:

refined github

All 38 comments

Shouldn't be hard to adapt the code. Feel free to steal the code and make a Safari extension. I'm not going to, though.

I'll probably PR later today then ;P

I'm not interested in maintaining it. Just fork the repo and do your thing.

What if I propose you a PR making the build process automatic like what does Octotree (builds for every navigator are automated through Gulp) ? https://github.com/buunguyen/octotree

@fantattitude No. Sorry, not trying to be difficult, but I've gone through this before and made extensions for all browsers, and it was such pain. Even if you automate the build-step, I will still receive issues regarding the Safari extension. I just don't have time or interest in maintaining extensions for a browser I don't use. Can't you just maintain it on your own, and I'd be happy to link to your repo.

Oh yeah don't worry 👌🏻
I was just asking I can totally understand your point. Supporting with several browsers can be painful.

I'll do that then, thanks for your time and nice work on the extension !

Hi @sindresorhus, I made a repo with the Safari extension at https://github.com/fantattitude/refined-github-safari, feel free to tell me if everything's okay for you (regarding credits for example) and link to it on your README 😉

@fantattitude Cool. Linked to it from the readme :)

I suppose this could be reopened then?

Running xcrun safari-web-extension-converter on the Chrome Web Store version without any modifications seem to work at first glance:

refined github

@ngyikp Can you post some instructions on how you did this?

Can you distribute a safari extension outside of the Mac App Store? If so do you need to notarize it (and thus pay for a $100 developer account)?

I already have an App Store account and I have prepared the name "Refined GitHub". That's not a problem. What will be more difficult, however, is to automate the publishing. Maybe we could use fastlane for this.

Is it possible to publish Safari 14 webextensions and install them (say on Safari 14 TP on Catalina) already today? If so, would appreciate manual but less-often publishing to the App Store already now.

We're not going to officially publish it until we have the process automated. We do fixes all the time for things that break, and if users don't get those fast, they'll complain with bad reviews on the App Store. I don't want to commit to having to manually upload new versions constantly.

For now, you can manually install it yourself: https://github.com/sindresorhus/refined-github/issues/14#issuecomment-647828485

Got it.
FWIW xcrun safari-web-extension-converter doesn't work on Catalina with Xcode 12 Beta and Safari 14 TP. Only works on Big Sur. Thus my request.

For anyone else who was trying to do this but not succeeding, from the docs I believe the steps are:

_EDIT:_ Updated this with @fregante's correction below

git clone https://github.com/sindresorhus/refined-github && cd refined-github
npm install && npm run build # Unsure if required
xcrun safari-web-extension-converter $PWD/distribution/

This opens Xcode, you then build it, and allow unsigned extensions in Safari. You can then enable the extension in Preferences -> Extensions.

https://developer.apple.com/documentation/safariservices/safari_app_extensions/building_a_safari_app_extension#2957926
https://developer.apple.com/documentation/safariservices/safari_web_extensions/converting_a_web_extension_for_safari


This doesn't give you a way to enable the extension on GHE instances though, as you can't click the Refined GitHub icon, which is a bit of a limitation. I assume you could modify the source to fix it, but haven't managed to get that to work.

That's almost correct, except distribution instead of $PWD/source/

However I get this with Xcode 11.5

xcrun: error: unable to find utility "safari-web-extension-converter", not a developer tool or in PATH

@fregante I think you need the Xcode 12 beta.

@gibfahn I've followed your steps but don't see any Refined GitHub features like avatar photos next to the thumbs-up emoji at the top of this thread, despite the extension being enabled

image

and there not being any errors in the console… did you have to do anything else?

@wearhere Been having the same issue for quite some time as well, thought it was just me.

However I get this with Xcode 11.5

You might need the Big Sur beta as well as the Xcode 12 beta.

@gibfahn I've followed your steps but don't see any Refined GitHub features like avatar photos next to the thumbs-up emoji at the top of this thread, despite the extension being enabled

Yeah, this process got me to the extension showing up in the preferences as in your screenshot. I haven't actually used it yet or confirmed any of the features actually work.

You'd probably need to use the devtools debugger (for the current page and for the background extension) to work out what's going on.

safari 14 was released last week

Uhh, shameless plug to similar discussion: https://github.com/notlmn/browser-extension-template/issues/31

There is https://github.com/lautis/refined-github-safari which is installable through brew cask install refined-github-safari. Last commit is 2 days ago so it's pretty up to date

What's needed here exactly?
Is Safari support official/stable?
Does Apple accept the new browser extensions?

@dvcrn I tried out https://github.com/lautis/refined-github-safari but it has a couple of limitations relative to this project, most notably lack of support for GitHub enterprise: https://github.com/lautis/refined-github-safari/issues/8. Hoping that that might be easier if the project used the new Safari extensions (it doesn't atm) and/or if this project were ported directly.

@fregante I don't know if Safari support is stable or if Apple accepts the new browser extensions per se, since Big Sur is still in beta (and so I think Safari 14 is too?) _but_ the new extensions are usable in the beta. _This_ extension doesn't work as-is last I checked up-thread https://github.com/sindresorhus/refined-github/issues/14#issuecomment-671644151, but I would love to beta-test it as support becomes available.

@fregante I don't know if Safari support is stable or if Apple accepts the new browser extensions per se, since Big Sur is still in beta (and so I think Safari 14 is too?) _but_ the new extensions are usable in the beta.

Safari 14 was released officially on September 16th so no blockers on that specific front.

I'm looking into converting the current Safari app to use Web Extensions. Work in progress can be seen https://github.com/lautis/refined-github-safari/pull/21. The signing part looks quite puzzling as what used to be enough for the app extensions is not working for web extensions.

I'd be happy to merge the work to refined-github, although at least in short-term working on a separate repository is easier for me.

I noticed that Apple offers a conversion tool, would it be easier to use that? https://developer.apple.com/documentation/safariservices/safari_web_extensions/converting_a_web_extension_for_safari

Apple's conversion tool doesn't directly result in a working extension since there's Safari-incompatible syntax. After fixing that, the end result is pretty much same as in my branch.

Looking at Apple's materials, it might be that the missing part from my work is App Store. For Safari Extensions, only App Store is listed as a distribution option, whereas simple applications can be distributed outside of App Store by signing and notarising the app with Developer Id certificate. The Developer Id certificate approach also worked with the previous Safari App Extensions.

Indeed the incompatible syntax is the lack of negative lookbehinds support 🤦‍♂️

Other than that, the difference I see it that there's a preference button and page, so the options don't need to be re-implemented like in your current wrapper:

Refined GitHub is now available for Safari 🎉

but you'll have to build it locally. Please help us set up auto-deployment in https://github.com/sindresorhus/refined-github/issues/3686

Was this page helpful?
0 / 5 - 0 ratings

Related issues

durka picture durka  ·  3Comments

juliocanares picture juliocanares  ·  3Comments

alexanderadam picture alexanderadam  ·  3Comments

Celthi picture Celthi  ·  3Comments

yakov116 picture yakov116  ·  3Comments