JolinM Posted March 18, 2013 Share Posted March 18, 2013 Here is a workflow I use to instantly view any compatible web page in Instapaper's Text view, without adding it to your Instapaper account. In the workflow, there is two scripts. The upper one (currently connected) is for Chrome. The one on the bottom is for Safari. http://d.pr/f/cp39 Sridhar Katakam and paulw 2 Link to comment
paulw Posted March 7, 2014 Share Posted March 7, 2014 I'm trying to add an Alfred hotkey shortcut for the save to Instapaper bookmarklet. Using your workflow as an example, I can't get it to run. I think it may have something to do with html encoding in the javascript. The bookmarklet is: javascript:function%20iprl5()%7Bvar%20d=document,z=d.createElement('scr'+'ipt'),b=d.body,l=d.location;try%7Bif(!b)throw(0);d.title='(Saving...)%20'+d.title;z.setAttribute('src',l.protocol+'//www.instapaper.com/j/p2s8OpRKevt0?a=read-later&u='+encodeURIComponent(l.href)+'&t='+(new%20Date().getTime()));b.appendChild(z);%7Dcatch(e)%7Balert('Please%20wait%20until%20the%20page%20has%20loaded.');%7D%7Diprl5();void(0) And the osascript I'm trying to use for Alfred is: tell application "Safari" to do JavaScript "javascript:function iprl5(){var d=document,z=d.createElement('scr' 'ipt'),b=d.body,l=d.location;try{if(!b)throw(0);d.title='(Saving...)+'+d.title;z.setAttribute('src',l.protocol '//www.instapaper.com/j/p2s8OpRKevt0?a=read-later&u='+encodeURIComponent(l.href)+'&t='+(new Date().getTime()));b.appendChild(z);}catch(e){alert('Please wait until the page has loaded.');}}iprl5();void(0)" in the current tab of the front window I decoded the html with an online app, then replaced spaces with "+" in the places I thought were required. I'm unfamiliar with this stuff, though. Any ideas on making this work? Link to comment
JolinM Posted March 7, 2014 Author Share Posted March 7, 2014 I managed to do it with the javascript code from http://www.instapaper.com/save Here is the code I got: tell application "Safari" to do JavaScript "javascript:function iprl5(){var d=document,z=d.createElement('scr'+'ipt'),b=d.body,l=d.location;try{if(!b)throw(0);d.title='(Saving...) '+d.title;z.setAttribute('src',l.protocol+'//www.instapaper.com/j/4Vifm0CMV6m8?a=read-later&u='+encodeURIComponent(l.href)+'&t='+(new Date().getTime()));b.appendChild(z);}catch(e){alert('Please wait until the page has loaded.');}}iprl5();void(0)" in the current tab of the front window And here is the updated workflow. paulw 1 Link to comment
paulw Posted March 7, 2014 Share Posted March 7, 2014 Ah, thanks! Once I changed your Instapaper user id to mine, worked great. It was just a matter of a couple mixed up plus signs and spaces. Link to comment
JolinM Posted May 14, 2014 Author Share Posted May 14, 2014 Here it is; sorry for the delay! http://cl.ly/1S070z0v3E0r Link to comment
dood Posted April 5, 2019 Share Posted April 5, 2019 I'm unable to make this work in Brave – would there be a quick fix for adjusting the Chrome code? Thanks! Link to comment
JolinM Posted April 5, 2019 Author Share Posted April 5, 2019 @dood, you could try that https://cl.ly/b92edbcafa20 Basically, just changing the first line of the script to tell application "Brave Browser" Can’t test it, as I don’t use Instapaper anymore ¯\_(ツ)_/¯ Link to comment
dood Posted April 7, 2019 Share Posted April 7, 2019 (edited) @JolinM Thanks for the quick response! Nothing happened when I activated the workflow, so I ended up saving "https://www.instapaper.com/text?u={query}" as a custom web search. It takes a few more clicks, but it does the trick Edited April 7, 2019 by dood Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now