Skip to content

Instantly share code, notes, and snippets.

@phyesix
Last active March 20, 2024 13:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save phyesix/80b0d7e3c4c23cfb43c9c3fc06cb009d to your computer and use it in GitHub Desktop.
Save phyesix/80b0d7e3c4c23cfb43c9c3fc06cb009d to your computer and use it in GitHub Desktop.
Hacker News Main Page Clicker
// HACKERNEWS
document.querySelectorAll('[id^=up].clicky:not(.nosee)').forEach(function(e ,i) {
setTimeout(() => {
e.click();
let currentLink = e.parentNode.parentNode.nextElementSibling.querySelector('a').getAttribute('href');
window.open(currentLink, '_blank');
}, i * 1000 * (Math.floor(Math.random() * 6) + 1));
});
// HACKERNEWS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment