Send link under mouse cursor to Pocket
Let’s be honest, adding new URL’s to Pocket could be easier. One of its “annoyances” is that a user can only add new links by actually visiting a page. Sometimes, though, it would be nice to quickly add links from something like a link list, e.g. some podcast shownotes or the main YouTube page showing your subscriptions.
I made a macro recently which added links to Safari’s Reading List using a “clever” series of actions, but as it turned out, I completely forgot you can just ⇧-click a link to add to Reading List.
Unfortunately there’s nothing as convenient available for Pocket. … Until now!
This macro is an adoption of Federicco’s workflow. He’s using Alfred to add links to Pocket. Read his post on how to get an API key.
The script I wrote is slightly modified. It doesn’t use properties. As far as I recall these are saved to a plist. I wouldn’t want my password to be saved to disk in the clear. Unfortunately scripting Keychain doesn’t work anymore.
Anyway, apart of that, there’s nothing magical happening in the macros. Only two pause actions for “safety”1 and a
try wrapper around
do shell script. You get a nice growl notification at the end telling you about success or failure.
Adjust the device trigger for your input device. I’m using my internal MacBook trackpad only.
Download for Chrome and Safari (and Chromium and WebKit): https://www.box.com/s/bl4ic74l16iiqt5z10tk
The system needs a small fraction of time to actually put something onto the clipboard. ↩