Last active
August 29, 2015 14:17
-
-
Save ShingoFukuyama/8c181c47af7c612f22c6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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