<?xml version="1.0" encoding="iso-8859-1"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>dekstop weblog : Bookmarklet: Display Feed Links on Current Page</title>
    <link>http://dekstop.de/weblog/2006/03/feed_links_bookmarklet/</link>
    <description> I found an older article on the Google Reader blog where they post a great bookmarklet: It displays feeds referenced by the current page and allows you to preview them in Google Reader. Convenient for their users, and a great building block for a more generic tool. I&apos;ve modified ...</description>
    <dc:language>en-us</dc:language>
    <dc:rights>Copyright 2006 Martin Dittus</dc:rights>
    <lastBuildDate>Thu, 16 Mar 2006 01:57:19 GMT</lastBuildDate>
    <generator>MicroLinks 5.6 (dekstop.de)</generator>
    <managingEditor>public&#64;dekstop&#46;de</managingEditor>
    <webMaster>public&#64;dekstop&#46;de</webMaster>

    <item>
      <title>Comment on "Bookmarklet: Display Feed Links on Current Page"</title>
      <link>http://dekstop.de/weblog/2006/03/feed_links_bookmarklet/#232</link>
      <description><![CDATA[<p>I've made a small modification available that also changes the links to have the feed:// protocol so that you can use Opera's protocol binder for feeds :)</p>

<p>http://weblog.zerokspot.com/posts/675/</p>]]> &lt;p&gt;- &lt;/p&gt;</description>
      <dc:creator></dc:creator>
      <guid isPermaLink="true">http://dekstop.de/weblog/2006/03/feed_links_bookmarklet/#232</guid>
      <pubDate>Thu, 22 Jun 2006 12:20:30 GMT</pubDate>
    </item>
    <item>
      <title>Comment on "Bookmarklet: Display Feed Links on Current Page"</title>
      <link>http://dekstop.de/weblog/2006/03/feed_links_bookmarklet/#177</link>
      <description><![CDATA[<p>Whow, _that_ I didn't expect! <br />
thx for the note.</p>]]> &lt;p&gt;- <![CDATA[<a href="http://dekstop.de/" rel="nofollow">Martin Dittus</a>]]>&lt;/p&gt;</description>
      <dc:creator>Martin Dittus</dc:creator>
      <guid isPermaLink="true">http://dekstop.de/weblog/2006/03/feed_links_bookmarklet/#177</guid>
      <pubDate>Sun, 09 Apr 2006 21:46:54 GMT</pubDate>
    </item>
    <item>
      <title>Comment on "Bookmarklet: Display Feed Links on Current Page"</title>
      <link>http://dekstop.de/weblog/2006/03/feed_links_bookmarklet/#176</link>
      <description><![CDATA[<p>Hi,</p>

<p>Great Bookmarklet - IE does fine, at least IE7 on my pc!</p>]]> &lt;p&gt;- <![CDATA[<a href="http://pascal.vanhecke.info" rel="nofollow">Pascal Van Hecke</a>]]>&lt;/p&gt;</description>
      <dc:creator>Pascal Van Hecke</dc:creator>
      <guid isPermaLink="true">http://dekstop.de/weblog/2006/03/feed_links_bookmarklet/#176</guid>
      <pubDate>Sun, 09 Apr 2006 15:31:10 GMT</pubDate>
    </item>
    <item>
      <title>Comment on "Bookmarklet: Display Feed Links on Current Page"</title>
      <link>http://dekstop.de/weblog/2006/03/feed_links_bookmarklet/#165</link>
      <description><![CDATA[<p>Good to hear it's working there too ;)</p>

<p>Let me know if someone tries this on IE -- hm, or maybe I should simply boot up my old Thinkpad.</p>]]> &lt;p&gt;- <![CDATA[<a href="http://dekstop.de/" rel="nofollow">Martin Dittus</a>]]>&lt;/p&gt;</description>
      <dc:creator>Martin Dittus</dc:creator>
      <guid isPermaLink="true">http://dekstop.de/weblog/2006/03/feed_links_bookmarklet/#165</guid>
      <pubDate>Fri, 17 Mar 2006 18:30:26 GMT</pubDate>
    </item>
    <item>
      <title>Comment on "Bookmarklet: Display Feed Links on Current Page"</title>
      <link>http://dekstop.de/weblog/2006/03/feed_links_bookmarklet/#164</link>
      <description><![CDATA[<p>Great, thank you :D</p>

<p>Exactly what I was looking for for Camino :)</p>]]> &lt;p&gt;- <![CDATA[<a href="http://weblog.zerokspot.com" rel="nofollow">Horst Gutmann</a>]]>&lt;/p&gt;</description>
      <dc:creator>Horst Gutmann</dc:creator>
      <guid isPermaLink="true">http://dekstop.de/weblog/2006/03/feed_links_bookmarklet/#164</guid>
      <pubDate>Fri, 17 Mar 2006 13:06:35 GMT</pubDate>
    </item>


    <item>
      <title>Bookmarklet: Display Feed Links on Current Page</title>
      <link>http://dekstop.de/weblog/2006/03/feed_links_bookmarklet/</link> 
      <description><![CDATA[<table class="imagetable" border="0" width="500">
<tr>
	<td align="left">
		<img alt="feeds_bookmarklet.png" src="http://dekstop.de/weblog/2006/03/feed_links_bookmarklet/feeds_bookmarklet.png" width="450" height="168" border="0" /></td>
</tr>
</table>

<p>I found an older <a href="http://googlereader.blogspot.com/2005/11/subscribing-to-feeds-via-little-google.html">article</a> on the Google Reader blog where they post a great bookmarklet: It displays feeds referenced by the current page and allows you to preview them in Google Reader. Convenient for their users, and a great building block for a more generic tool.</p>

<p>I've modified their code in a number of ways -- the most obvious change is that the bookmarklet-generated links will point directly to the respective feed URLs, not to a Google Reader preview page. Then there are some cosmetic changes (I didn't like their choice of generated markup), but not much else.</p>

<p>Here's my version:</p>

<blockquote>
<p><a href="javascript:function%20txt(str){return%20document.createTextNode(str)}function%20tag(n,c){var%20e=document.createElement(n);e.style.fontFamily='Arial,sans-serif';e.style.color='#000';if(c)e.appendChild(c);return%20e}function%20p(c){return%20tag('p',c)}function%20a(href,desc){e=tag('a',txt(desc));e.href=href;e.style.color='#00c';e.style.textDecoration='underline';return%20e}var%20el=tag('div');el.style.zIndex=100000;el.style.position='absolute';el.style.padding='20px';el.style.top='10px';el.style.left='10px';el.style.backgroundColor='#ffffcc';el.style.border='1px%20solid%20#333333';el.style.textAlign='left';var%20ul=tag('ul');var%20found=false;var%20links=document.getElementsByTagName('link');for(var%20i=0,link;link=links[i];i++){var%20type=link.getAttribute('type');var%20rel=link.getAttribute('rel');if(type&amp;&amp;(type=='application/rss+xml'||type=='application/atom+xml')&amp;&amp;rel&amp;&amp;rel=='alternate'){var%20href=link.getAttribute('href');if(!href.match(/^http/)){var%20path=(href.match(/^\//))?%20'/'%20:%20location.pathname;href='http://'+location.hostname+path+href;}var%20title=link.getAttribute('title');ul.appendChild(tag('li',a(href,((title)%20?%20title+'%20-%20'%20:%20'')+href)));found=true;}}if(found){el.appendChild(p(txt('The%20current%20page%20links%20to%20these%20feeds:')));el.appendChild(ul);}else{el.appendChild(p(txt('The%20current%20page%20does%20not%20link%20to%20any%20feeds.')));}var%20close=a('#','Close');close.onclick=function(){el.style.display='none';return%20false;};el.appendChild(p(close));function%20addFeedBox(){document.body.appendChild(el);y=window.scroll(0,0);}void(z=addFeedBox());">Show all feeds</a></p>
</blockquote>

<p>I'll be using this bookmarklet a lot -- Safari's handling of the &lt;link&gt;-tag is not very convenient, and I've just about enough of manually looking for feed links, be it on the page or (frequently also) in the HTML source.</p>

<p>Chris Wetherell of the Google Reader team states in their aforementioned article that this will not work in IE6 with SP2 -- I haven't tested on any IE. FF and Safari work fine.</p>

<p><small><strong>Update:</strong> 2006-03-16 -- made some small changes to the code.</small></p>
<p><small><strong>Update:</strong> 2006-03-17 -- fixed a text color bug on some sites. Slightly shorter code.</small></p>
<p><small><strong>Update:</strong> 2006-03-19 -- fixed another text-related bug on some sites. Some refactoring -&gt; even shorter.</small></p>
<p><small><strong>Update:</strong> 2006-05-08 -- Pascal Van Hecke <a href="http://pascal.vanhecke.info/2006/04/10/rss-link-discovery-bookmarklet/">pointed</a> to this article in his own blog, and one of his readers <a href="http://pascal.vanhecke.info/2006/04/10/rss-link-discovery-bookmarklet/#comment-1765">states</a> in the comments that it's also working in Opera.</small></p>
<p><small><strong>Update:</strong> 2006-06-22 -- Horst Gutmann uses the bookmarklet to <a href="http://weblog.zerokspot.com/posts/675/">work around a usability issue</a> in Opera 9.0 (see <a href="http://my.opera.com/community/forums/topic.dml?id=143833">forum discussion</a>)</small></p>
<p><small><strong>Update:</strong> 2006-11-18 -- Marjolein Hoekstra extends this into an <a href="http://www.cleverclogs.org/2006/10/opml_autodiscov.html">OPML Auto-discovery Bookmarklet</a>, cool idea! The accompanying article also has a great explanation of the process of feed discovery, and on how to make your OPML auto-discoverable, so it's definitely a recommended read.</small></p>]]></description>
      <dc:creator>Martin Dittus</dc:creator>
      <category>code</category>
      <category>tools</category>
      
      <guid isPermaLink="true">http://dekstop.de/weblog/2006/03/feed_links_bookmarklet/</guid>
      <pubDate>Thu, 16 Mar 2006 01:57:19 GMT</pubDate>
    </item>
  </channel>
</rss>
