Skip to content

Instantly share code, notes, and snippets.

@sente
Last active October 30, 2018 00:12
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save sente/3d6be3466c4bd78886a478b5269017f5 to your computer and use it in GitHub Desktop.
Save sente/3d6be3466c4bd78886a478b5269017f5 to your computer and use it in GitHub Desktop.
function click_all_the_things() {
buttons = $('.sgbutton').toArray()
function clickbutton() {
console.log(buttons.length)
if(buttons.length > 0){
button = buttons.pop();
console.log("clicking button", button);
button.click();
}
}
window.setInterval(clickbutton,2000);
}
function fix_the_grid() {
$('.ui-jqgrid-bdiv').css('height','')
$("#similarityTweets").jqGrid("setGridParam",{rowNum:1000})
}
function click_all_the_things() {
buttons = $('.sgbutton').toArray()
function clickbutton() {
console.log(buttons.length)
if(buttons.length > 0){
button = buttons.pop();
console.log("clicking button", button);
button.click();
}
else {
window.clearInterval(foobar)
}
}
foobar = window.setInterval(clickbutton,100);
return foobar;
}
function hack_main(){
fix_the_grid();
click_all_the_things();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment