homerchen19 / github-file-icons

🌈 🗂 A browser extension which gives different filetypes different icons to GitHub, GitLab, gitea and gogs.
https://chrome.google.com/webstore/detail/file-icon-for-github-and/ficfmibkjjnpogdcfhfokmihanoldbfe
MIT License
1.46k stars 70 forks source link

Safari support? #13

Closed arguiot closed 2 years ago

arguiot commented 6 years ago

It would be great 👍 if there were a Safari version of it 😊.

homerchen19 commented 6 years ago

Haven't try it yet. I would do it when I'm free. PRs are welcome 😄

patrik-csak commented 3 years ago

I got the extension working in Safari locally with the following steps:

  1. Configure Safari in macOS to Run Unsigned Extensions
  2. Convert web extension:

    # In github-file-icons/
    npm run build && xcrun safari-web-extension-converter build

    This creates and opens an Xcode project

  3. Select 'macOS (Extension)' in Xcode sidebar, then choose Product > Run from the menubar. This will open what looks like a desktop version of File Icons for GitHub and GitLab.
  4. Click 'Quit and Open Safari Extensions Preferences...'
  5. Enable File Icons for GitHub and GitLab

GitHub File Icons extension running on Safari

christopherpickering commented 2 years ago

Thanks! This still works 👍🏽

christopherpickering commented 2 years ago

@ptrkcsk did you find a way to keep the extension after a reboot? I have to read it after a reboot.

edit: it seems safari just reset the "enable unsigned..." when I restarted.

patrik-csak commented 2 years ago

i have the same issue

christopherpickering commented 2 years ago

It seems like to get the extension to be signed you have to fork out the $100 to add it to the appstore/get a developer certificate to sign it. https://stackoverflow.com/questions/39927598/can-you-distribute-a-safari-app-extension-outside-the-mac-app-store

I'm happy to put it on the App Store. Any one interested in contributing to the fees? From browsing other repos it looks like a GitHub action can be setup to build and deploy it to the App Store. https://preece.dev/2020/06/ios-testflight-deploy-with-github-actions/. If I do it, I'd probably make a separate repo that checks here for pushes on master once a day and build a new version where there's been an update. @homerchen19 what do you think?

christopherpickering commented 2 years ago

@ptrkcsk I took the plunge :D I had to tweak a few files in the extension converter output to make it build a usable package. Let me know if they work for you w/out turning on the unsigned option in Safari.

christopherpickering commented 2 years ago

I got a GitHub action to build the extension using my cert, here's a build with the app you can download. After unzipping It needs to go into "applications" before running.

https://github.com/christopherpickering/github-file-icons/actions/runs/2551948841

christopherpickering commented 2 years ago

Here's a build in the App Store: https://apps.apple.com/app/file-icons-for-github/id1631366167

homerchen19 commented 2 years ago

https://github.com/homerchen19/github-file-icons/pull/119