Skip to content

Instantly share code, notes, and snippets.

@ShingoFukuyama
Last active August 29, 2015 14:17
Show Gist options
  • Save ShingoFukuyama/8c181c47af7c612f22c6 to your computer and use it in GitHub Desktop.
Save ShingoFukuyama/8c181c47af7c612f22c6 to your computer and use it in GitHub Desktop.
(function(d){
var links = d.getElementsByTagName('link');
var rss = 0;
for (var i = 0; i < links.length; i++) {
if (/application\/(rss|atom)\+xml/.test(links[i].type)) {
rss = 1;
break;
}
}
if (rss) {
alert('rss found');
} else {
alert('rss not found');
}
})(document);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment