Skip to content

Instantly share code, notes, and snippets.

@uetchy
Created March 15, 2014 21:39
Show Gist options
  • Save uetchy/9574297 to your computer and use it in GitHub Desktop.
Save uetchy/9574297 to your computer and use it in GitHub Desktop.
Add to Feedly(contains relative uri support)
javascript:(function(){void (d=document);void (el=d.getElementsByTagName("link"));void (count=0);for(i=0;i<el.length;i++){if(el[i].getAttribute("rel").indexOf("alternate")!=-1){if(count==0){ty=el[i].getAttribute("type");if(ty.indexOf("application/rss+xml")!=-1||ty.indexOf("text/xml")!=-1){h=el[i].getAttribute("href");if(h.indexOf("comments")==-1){if(h.indexOf("/")==0){window.open("http://www.feedly.com/home#subscription/feed/"+location.protocol+"//"+location.host+h,"_blank")}else{window.open("http://www.feedly.com/home#subscription/feed/"+h,"_blank")}}}}count++}}void 0})()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment