<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DZone Snippets: instapaper code</title>
    <link>http://snippets.dzone.com/posts</link>
    <pubDate>Fri, 25 Jul 2008 00:56:27 GMT</pubDate>
    <description>DZone Snippets: instapaper code</description>
    <item>
      <title>instapaper bookmarklet</title>
      <link>http://snippets.dzone.com/posts/show/5063</link>
      <description>Assuming you are registered with the new bookmarking service '&lt;a href="http://www.instapaper.com/"&gt;instapaper&lt;/a&gt;', then you would use the following code which would normally be placed as a link within your web browser's toolbar.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;javascript:var d=document,w=window,e=w.getSelection,k=d.getSelection,x=d.selection,&lt;br /&gt;s=(e?e():(k)?k():(x?x.createRange().text:0)),f='http://www.instapaper.com/b',&lt;br /&gt;l=d.location,e=encodeURIComponent,p='?v=3&amp;u='+e(l.href) +'&amp;t='+e(d.title) +'&amp;s='+e(s),&lt;br /&gt;u=f+p;try{if(!/^(.*\.)?instapaper([^.]*)?$/.test(l.host))throw(0);&lt;br /&gt;iptstbt();}catch(z){a =function(){if(!w.open(u,'t','toolbar=0,resizable=0,status=1,&lt;br /&gt;width=250,height=150'))l.href=u;};if(/Firefox/.test(navigator.userAgent))setTimeout(a,0);&lt;br /&gt;else a();}void(0)&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;I'm interested in using similar JavaScript if I ever write my own personal bookmarking service.</description>
      <pubDate>Thu, 31 Jan 2008 15:23:12 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/5063</guid>
      <author>jrobertson (James Robertson)</author>
    </item>
  </channel>
</rss>
