I would like to convert web archives stored in Devonthink to a mobile-friendly format using the Instapaper Mobilizer text engine. I have a script that I have created (I’ll share it in the next posting – it’s clutzy but it gets the job done) for converting web archives to Readability format, and I can use this as a model.
Instapaper offers a browser bookmark that does this conversion in Safari, etc.: javascript:function%20iptxt(){var%20d=document;try{if(!d.body)throw(0);window.location='http://www.instapaper.com/text?u=’+encodeURIComponent(d.location.href);}catch(e){alert(‘Please%20wait%20until%20the%20page%20has%20loaded.’);}}iptxt();void(0)
The question I have is how do I convert this javascript to be compatible with DevonThink – I don’t think I can just script it as
do javascript “function%20iptxt(){var%20d=document;
try{if(!d.body)throw(0);window.location='http://www.instapaper.com/text?u=’+encodeURIComponent(d.location.href);
}catch(e){alert(‘Please%20wait%20until%20the%20page%20has%20loaded.’);
}}iptxt();void(0)”
Any help on how to code this for a Devonthink script? Thanks.