Skip to content

Instantly share code, notes, and snippets.

View AncientSwordRage's full-sized avatar

Craig AncientSwordRage

  • UK
View GitHub Profile
@AncientSwordRage
AncientSwordRage / gist:610c81cf739361c2513fea68fc0650b7
Created February 23, 2018 23:14
Open all 'load more comments' links on reddit
// paste into console
function sleep(ms) {return new Promise(resolve => setTimeout(resolve, ms));}
$('a').filter(function(){ return $(this).text().indexOf('load more comments')>=0;}).each(async function(ind, link) {await sleep(1000*ind).then(function(){console.log("Clicking link: "+ind); link.click()})})