Last active
April 13, 2019 10:29
-
-
Save shahidcodes/c2c03eef0a6767bcd8eee6a04d30b49e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var scrollCount = 0 | |
var btns = []; | |
let delay = 0 | |
var addConnections = ()=>{ | |
btns.forEach(el=>{ | |
delay += Math.floor(Math.random()*3000); | |
console.log("btn set to auto click after " + delay + "ms") | |
setTimeout(()=>{ | |
el.click(); | |
}, delay) | |
}) | |
} | |
var interval = setInterval(() => { | |
btns.push(...$('button[data-control-name="invite"]')); | |
console.log("scrolled", btns.length) | |
window.scrollTo(0, document.body.scrollHeight) | |
window.scrollTo(document.body.scrollHeight, 0) | |
window.scrollTo(0, document.body.scrollHeight) | |
scrollCount++; | |
if(scrollCount === 6){ | |
clearInterval(interval) | |
addConnections(); | |
} | |
}, 5e3) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(()=>{ | |
document.querySelectorAll(".invitation-card").forEach(item=>{ | |
let timesAgo = item.querySelector("time").innerHTML.trim(); | |
if(timesAgo == "2 months ago" || timesAgo == "3 months ago"){ | |
item.querySelector("button").click(); | |
} | |
}); | |
})() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment