Create a gist now

Instantly share code, notes, and snippets.

@sente /hack.js
Last active Sep 26, 2017

What would you like to do?
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