Last active
August 29, 2015 14:21
-
-
Save gerbz/02f9cb6fb37def0e2212 to your computer and use it in GitHub Desktop.
Feedly Bookmarklet (ignores comment feeds)
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
javascript: void(el = document.getElementsByTagName('link')); | |
void(g = false); | |
for (i = 0; i < el.length; i++) { | |
if(r = el[i].getAttribute('rel')){ | |
if (r.indexOf('alternate') != -1) { | |
if(t = el[i].getAttribute('type')){ | |
if(t.indexOf('rss') != -1) { | |
if(h = el[i].getAttribute('href')){ | |
if (h.indexOf('comment') == -1) { | |
if(t = el[i].getAttribute('title')){ | |
t = t.toLowerCase(); | |
if (t.indexOf('comment') == -1) { | |
g = true; | |
break; | |
} | |
}else{ | |
g = true; | |
break; | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}; | |
if (!g) { | |
window.alert('Could not find the RSS Feed'); | |
}else{ | |
void(window.location.href = 'http://www.feedly.com/home#subscription/feed/' + h); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment