3 ms·
I was happily upvoting adam's new account, and then remembered that this is hacker news: var links = document.getElementsByTagName('a'); for (var i = links
by javajosh 14y ago
I was happily upvoting adam's new account, and then remembered that this is hacker news:
var links = document.getElementsByTagName('a'); for (var i = links.length >>> 0; i--;) {if (links[i].innerHTML==='adamwhitcroft'){var j=i; while (!links[++j].id){}; console.log(links[j], links[j].click())}}
If you paste this into WebKit inspector and run it, it will click all of adam's upvote links.
Here's a little puzzle - there is one trivial change that will change upvotes to downvotes. Can you guess what it is?
- deleted 14y ago[deleted]
- barlo 14y agoYes, but I would hope it would not be used. This isn't what the point system is about on HN.
- javajosh 14y agoIn general, no. But when someone is so generous, and I want to add to their karma, why put myself through the misery of finding and clicking on his upvotes? Like any tool, it should be used responsibly.