Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Safari version #14

Closed
fantattitude opened this issue Feb 17, 2016 · 38 comments
Closed

Safari version #14

fantattitude opened this issue Feb 17, 2016 · 38 comments
Assignees
Labels
safari Related to Safari only

Comments

@fantattitude
Copy link

fantattitude commented Feb 17, 2016

Refined GitHub Safari is now available for both the Mac and iOS

Download Refined GitHub for Safari

Original request

Would be great to have a Safari version as well 😁

@sindresorhus
Copy link
Member

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.

@fantattitude
Copy link
Author

I'll probably PR later today then ;P

@sindresorhus
Copy link
Member

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

@fantattitude
Copy link
Author

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

@sindresorhus
Copy link
Member

@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.

@fantattitude
Copy link
Author

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 !

@fantattitude
Copy link
Author

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 😉

@sindresorhus
Copy link
Member

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

@nesl247
Copy link
Contributor

nesl247 commented Jun 22, 2020

I suppose this could be reopened then?

@sindresorhus
Copy link
Member

Yes! https://developer.apple.com/documentation/safariservices/safari_web_extensions/converting_a_web_extension_for_safari

@sindresorhus sindresorhus reopened this Jun 22, 2020
@ngyikp
Copy link

ngyikp commented Jun 23, 2020

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

refined github

@nesl247
Copy link
Contributor

nesl247 commented Jun 23, 2020

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

@tbodt
Copy link

tbodt commented Jun 23, 2020

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)?

@sindresorhus
Copy link
Member

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.

@andreineculau
Copy link

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.

@sindresorhus
Copy link
Member

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: #14 (comment)

@andreineculau
Copy link

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.

@gibfahn
Copy link
Contributor

gibfahn commented Aug 6, 2020

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.

@fregante
Copy link
Member

fregante commented Aug 6, 2020

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

@sindresorhus
Copy link
Member

@fregante I think you need the Xcode 12 beta.

@markdorison
Copy link

@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.

@fregante
Copy link
Member

fregante commented Oct 16, 2020

So we need your help to

@fregante fregante added the Please! ♥︎ Particularly useful features that everyone would love! label Oct 16, 2020
@fregante fregante pinned this issue Oct 16, 2020
@fregante fregante changed the title Safari version Safari version: help us setup the build and deployment Oct 16, 2020
@lautis
Copy link
Contributor

lautis commented Oct 19, 2020

I'm looking into converting the current Safari app to use Web Extensions. Work in progress can be seen lautis/refined-github-safari#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.

@fregante
Copy link
Member

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

@lautis
Copy link
Contributor

lautis commented Oct 19, 2020

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.

@lautis
Copy link
Contributor

lautis commented Oct 19, 2020

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.

@fregante
Copy link
Member

fregante commented Oct 21, 2020

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

@fregante
Copy link
Member

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:

@fregante fregante added the safari Related to Safari only label Oct 22, 2020
@fregante fregante removed Please! ♥︎ Particularly useful features that everyone would love! help wanted labels Oct 25, 2020
@fregante fregante self-assigned this Oct 25, 2020
@fregante
Copy link
Member

Refined GitHub is now available for Safari 🎉

but you'll have to build it locally. Please help us set up auto-deployment in #3686

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
safari Related to Safari only
Development

No branches or pull requests