Open itaysk opened 3 years ago
thanks man, yea I think safari is the future; hoping they get a native password manager / keychain
I know the script 'highlighter.js' was literally a copy/paste to the console in the past, but yea I never figured out the xcode process, thanks for the information
Hi @neaumusic I managed to convert this to Safari Extension. Works fine so far. Would you be able to publish it officially in the Safari Extensions? If not, can I do it?
@petukhov hey sorry for the delay! yea I can definitely publish it in Safari, I think I just need to pay a fee or something
hopefully it wasn't too difficult to convert it, I've always wondered how version control should work with git, but I'll do some research
@neaumusic No worries, yeah I think $100 fee is required. You did a great job with this extension! Looking forward to using it on Safari soon.
So I decided to migrate to Safari after all and missed this extension too much. I am no web developer and definitely not an Apple developer but I was able to port it and I'm sharing here the steps I took:
error:0308010C:digital envelope routines::unsupported
which appears to be related to older webpack version and newer node. I resolved this by adding using a legacy option: NODE_OPTIONS=--openssl-legacy-provider yarn
xcrun
but running it explicitly worked: /Applications/Xcode.app/Contents/Developer/usr/bin/safari-web-extension-converter ./chrome_extension --app-name selection-highlighter --bundle-identifier itaysk.selection-highlighter --macos-only --swift --no-open --copy-resources
The only problem is the the allow untrusted checkbox is cleared after Safari is quit, I guess this is "a feature" of Safari. The solution would be to sign the extension but for this, an Apple Developer Account is needed. Anyway, hope this helps someone.
@itaysk I'm finally getting around to this again, with the help of Cursor AI 🙂 it even kinda works on iOS!! It's taken me so long that we can use the Highlight API version rather than the old DOM mutation version lol..
I think I've got a pretty good build process and that I can make some fixes tomorrow and publish (probably have to remove PayPal and account for no selectionstart
event). It uses an intermediary build folder and shell script to convert the build folder via the CLI to the dist folder, where dist/safari_extension has the .xcodeproj, can be opened and compiled as a target for MacOS or iOS if you enable all the developer flags, sign in and sign the extension
amazing! looking forward
Getting closer, primarily have to fix 'resize' triggering scrollbar redraw, but it's already come in extremely handy, can't wait to get it published
Just an update -- Safari on macOS and iOS seem to have a bug with the Highlight API -- img tags, the canvas, and sometimes entire paragraphs are highlighted, making it relatively useless in many cases. I'm familiar enough with Xcode now that if I can find a solution, I can definitely push them to the app stores. Might push to Testflight if I can figure that out. A bit disappointing, but they only started supporting the api in October/December 2023 so I'm not too frustrated
yes I faced the same issue in my improvised port, but don't have the skills to workaround it. happy to help test the extension in TestFlight if you need second validation
oh I just noticed that you included the project in the release now. I managed to install it (it complained about missing account and team, I changed "Team" to "None"), and it works fine!
Hello, I've been enjoying this extension for a long time, thank you! I love it so much that when I decided to move to Safari, it's unavailability made me reconsider the move. I don't know if this was on your radar already but I thought I throw in my request as well, and have an issue which people can upvote.
Apple has an tool that lets you convert chrome extensions to Safari: https://bartsolutions.github.io/2020/11/20/safari-extension/ Not sure it'll flawlessly work here, but I had success with porting the other simple extensions I needed with this tool and side-loading them. Then there's the Apple Developer fee that you need to pay in order to submit :(