r/smallprog • • Mar 12 '10
Javascript function for opening Reddit Links
javascript:(function(){var links=document.querySelectorAll("#siteTable>div>div.entry>p.title>a.title");for(var i=0;i<links.length;i++){var link=links.item(i);if(window.getComputedStyle(link,null).getPropertyValue('color')=="rgb(0, 0, 255)"){window.open(link)}}})();
Another redditor posted this in a comment a while ago. I am unable to locate the origional post using the reddit search function nor google.
It opens up all unvisited (blue) links displayed on reddit in a new tab.
To use, save the javascript as a bookmark. Enjoy surfing pics/fffffffuuuuuuuuuuuu/comics/etc.
2
Upvotes
View all comments
Show parent comment
3
u/[deleted] Mar 14 '10
I'll give it a try, I never looked in depth into the code after I bookmarked it. Thank you.