I've really enjoyed using Joplin, and it has worked well for me on a Mac. I've always wanted to be able to clip pages from Safari, however. I finally started to develop a Safari App Extension a while back and managed to get something working.
It does the basics: Clipping pages (complete and simplified); clipping URLs and selections; tagging; selecting folders; changing the title; checking on server status and disabling the controls if Joplin isn't running. It's based on the Web Clipper for Chrome and Firefox provided with Joplin, with Javascript modifications to support Safari App Extensions and, of course, a native-based UI. Some things are not implemented (complete HTML clipping and screenshot capture), but the basics are there.
One item to note: It does operate differently than the Chrome/Firefox Extension, in that the "Clip" buttons operate immediately. There is no "Confirm" step after selecting your Clip option.
Overall, while definitely beta-level code, it is stable enough for daily use. It's been great to be able to use Safari to clip content into Joplin and not have to jump over to Chrome.
Unfortunately, my timing could not have been worse, thanks to the recent WWDC2020 announcement of Web Extensions coming to Safari. I wanted to put a little more polish on this and clean up the code some more (it's my first real App Extension). I suspect that eventually this will be replaced by the Chrome/Firefox Clipper updated for Safari, so I figured I'd release it now and hope people get some use from it.
Hi, First of all thanks for taking the time to create this app. I’m with you on needing this for Safari.
Unfortunately I’ve downloaded and installed the web clipper app for Safari and can’t seem to get it to work. I’ve enable it in the Safari preferences, see the icon next to the address bar, however when trying to clip a page it just gives you the message that it’s in progress, and never seems to get the job done. No note appears in Joplin anywhere that I can find. I’ve tried simplified and complete clipping options with the same results.
Safari version: 13.1.1 (15609.2.9.1.2)
MacOS Catalina: 10.15.5
MacBook Pro 13 inch (2019, Four Thunderbolt 3 ports)
I am not an Apple user but I can imagine that this problem occurs when the clipper service isn’t enabled in the joplin options. Did you enabled the service (in Joplin Desktop go to: Tools–>Options–>Web clipper and click on “Enable Web Clipper Service”)?
Are you seeing this on every page you visit or pages you already have loaded in Safari? One thing to try is to reload the page and try it again.
For some reason, if you try to run the Extension right after it is installed on a page that was previously loaded, it hangs at “Processing”. If you refresh/reload, it should work as designed. I believe it has to do with the content script not being fully injected but I need to investigate further.
You seem to have solved the issue here. I couldn’t recall if I’d reloaded the pages I tried it with since installing the app. I tend to keep a lot of tabs open in Safari. Trying it on a new tab loaded up after installing the Webclipper plugin seems to work perfectly.
I don’t think the timing is bad at all. Yes, Web Extensions API will be in macOS Big Sur … but that releases this Fall & will take a year to really permeate. Your extension will be useful & valid for much longer considering those that lag on OS updates (as potentially bad as that might be).
This is awesome and might be what lets me switch to Joplin.
I might be missing if you said this, but how do I install this once I’ve cloned the repo?
Just unzip, move the executable to the Applications folder, and run the app once. You’ll be prompted to enable it in Safari Extensions, then you should be good to go.
Hi everyone! Just wanted to let you all know that I updated the Safari App Extension to support the new APIs introduced in Joplin v1.4.12.
If you are running that version or later of Joplin, you will need to upgrade to this latest version of the Extension (v0.2.0); otherwise, you will no longer be able to select folders or save pages.
@leclercfl Still working on it. I have something working but it's pretty rough. I've been pulled into a work project that's limited my free time, but I'm hoping to have an update published in the next week or so. I'll post something here when it's ready.
@laurent Thanks for sharing that info! That's been a big help!
@leclercfl I have a new build that should support the authorization mechanism in Joplin now. Check it out with Joplin v2.1.5 or later. You will most likely encounter bugs if you refuse an auth request, but for the most common cases the Clipper should be functional.