For example, to get the URL or title you do this: var URL = unescape(location.href) var Title = unescape(document.title) How can i get the RSS feed location? I assume i have to find this, and get it from that. <link rel="alternate" type="application/rss+xml" title="RSS - Title" href="feeds/rss.xml" />
function locateFeed() { var els = document.getElementsByTagName('link'); for(i=0;i<els.length;i++) { if(els[i].getAttribute('title').indexOf('RSS') > -1) { var feed = els[i].getAttribute('href'); } } return feed; } Code (markup): This script assumes that RSS is in the title attribute, I believe this is the best way to catch the right link element. This one checks if the rel="alternate": function locateFeed() { var els = document.getElementsByTagName('link'); for(i=0;i<els.length;i++) { if(els[i].getAttribute('rel') == 'alternate') { var feed = els[i].getAttribute('href'); } } return feed; } Code (markup):