Last active
January 27, 2021 16:20
-
-
Save lgg/cf6f05e18c709ab3c0f228a860c36991 to your computer and use it in GitHub Desktop.
Своя игра online auto-clicker
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
clickerActivated = false; | |
function autoClicker(e) { | |
try { | |
if (e.currentTarget.children[0].classList.contains('tableBorder')) { | |
if (window.getComputedStyle(document.getElementById('table').children[0], null)['border-color'] === "rgb(255, 230, 130)") { | |
document.getElementById('playerButtonHost').children[0].click(); | |
console.log('CLICKED') | |
} | |
} | |
} catch (e) { | |
} | |
} | |
$(document).keydown(function (e) { | |
console.log(e.which) | |
if (e.which === 81) { // q | |
console.log('clickerActive status' + clickerActivated); | |
if (clickerActivated) { | |
console.log('CLICKER ACTIVATED'); | |
$('#table').bind('DOMSubtreeModified', autoClicker); | |
} else { | |
console.log('CLICKER DISABLED'); | |
$('#table').removeEventListener("DOMSubtreeModified", autoClicker, false); | |
} | |
clickerActivated = !clickerActivated; | |
} | |
//e.preventDefault(); // prevent the default action (scroll / move caret) | |
}); | |
/* | |
Style for border with selection: border-color: rgb(255, 230, 130); | |
*/ |
Try to run this code in console only when the game is already loaded and the first question was already asked (so you have 'answer' button), maybe it could help. Also, the devs of SI website could change smth on the website.
As I remember it was only a draft and it don't work stable.
Unfortunately, I have no time now for patching/fixing this, sorry.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello!
It returns "Cannot read property 'keydown' of undefined" when I'm trying to run it in the chrome console on the SI website. I am totally oblivious to js - is it me doing something incorrectly or it's not supposed to work at all?
Cheers!