Created
July 19, 2021 11:23
-
-
Save Cosmeen/eedee23d148eb658bc1b9e40d672e02b to your computer and use it in GitHub Desktop.
This file contains hidden or 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
// ==UserScript== | |
// @name twitch clicky | |
// @namespace twitch.bits | |
// @version 0.2 | |
// @description try to take over the world! | |
// @author You | |
// @match https://www.twitch.tv/* | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
setInterval(function(){ | |
var btn = document.querySelector('button[aria-label="Claim Bonus"]'); | |
if (btn !== null) { | |
var random = getRandom(666,6666); | |
setTimeout(function(){ | |
btn.click(); | |
}, random); | |
} | |
document.querySelector('button[aria-label="Claim Bonus"]').click(); | |
}, 1000); | |
function getRandom(min, max) { | |
return Math.random() * (max - min) + min; | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment