indie-wiki-buddy icon indicating copy to clipboard operation
indie-wiki-buddy copied to clipboard

Launch on Safari

Open KevinPayravi opened this issue 2 years ago • 9 comments

A bit more overhead but shouldn't be too difficult.

Guide for converting existing extensions to Safari: https://developer.apple.com/documentation/safariservices/safari_web_extensions/converting_a_web_extension_for_safari

KevinPayravi avatar Feb 10 '23 05:02 KevinPayravi

Did an initial run of converting the extension to Safari; looks like it is going to take a lot of code changes to make it fully compatible.

KevinPayravi avatar Mar 09 '23 09:03 KevinPayravi

I've been able to convert the extension to use it with Safari without needing to make major changes to the existing code https://github.com/MichaelJBerk/indie-wiki-buddy

MichaelJBerk avatar Dec 06 '23 00:12 MichaelJBerk

@MichaelJBerk That's awesome, thank you! 🎉 I'll test it out.

KevinPayravi avatar Dec 06 '23 07:12 KevinPayravi

Any news?

yinyue200 avatar Apr 21 '24 18:04 yinyue200

we would also appreciate any updates on this.

pleonasticTautology avatar May 06 '24 03:05 pleonasticTautology

Sorry for the late response. I've been able to get stuff working on my fork, with a few caveats:

  • I have to use another method to watch pages, since a Safari extension non-persistent background page cannot listen to webRequest events. Specifically, I have it add a listener to onTabUpdated instead.
  • It seems that Safari Extensions can't have notifications for some reason, so that option will need to be removed on Safari
  • When trying to decompress search engine and wiki settings, Response.blob() fails because it expects an ArrayBuffer for some reason. No idea what the specific cause of this is.

MichaelJBerk avatar May 15 '24 03:05 MichaelJBerk

I have a branch on this main repo called safari that I also got largely working on Safari. Like Michael mentioned, we have to use a different method to capture navigation, and notifications had to be commented out.

With this commit, I changed how decompression works in scripts/common-functions.js and it should work across all browsers smoothly now.

I believe this branch is nearly ready for deployment to the App Store. The biggest remaining task I've been working on is the app landing page for iOS. iOS users need to enable Indie Wiki Buddy per-domain, so we need to adequately communicate this to users on-install.

KevinPayravi avatar May 15 '24 22:05 KevinPayravi

Installed it to my iPad and it seems like the popup doesn't have a proper minimum width image

Also, none of the css for the settings or popup seem to load, since the css folder isn't in the Xcode project. I've added them back in my fork (and updated the gitignore while i'm at it), but still haven't set a minimum-width for the popup.

Should I open a PR for this?

MichaelJBerk avatar May 16 '24 03:05 MichaelJBerk

Installed it to my iPad and it seems like the popup doesn't have a proper minimum width image

Also, none of the css for the settings or popup seem to load, since the css folder isn't in the Xcode project. I've added them back in my fork (and updated the gitignore while i'm at it), but still haven't set a minimum-width for the popup.

Should I open a PR for this?

A PR would be great, thank you! I just merged changes from main into safari last night that I believe included a CSS refactor that moved CSS into their own stylesheets (among others things), so that's likely why.

KevinPayravi avatar May 16 '24 05:05 KevinPayravi