-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsuperclick.js
1 lines (1 loc) · 1.57 KB
/
superclick.js
1
javascript:(function(x, y) { if (!window.click) { window.click = true; document.body.style.cursor = "crosshair"; var cps = prompt("Autoclicker activated! Enter the CPS:\n\nCtrl + Shift + I = Stop\n\nCtrl + Shift + E = Limit time"); if (!cps || isNaN(cps)) { alert("You entered something wrong. Try running the script again."); return; } else { alert("Autoclicker activated at " + cps + " CPS! Press Ctrl + Shift + I to stop."); } var totalClicks = 0; var int; addEventListener("mousemove", function(e) { x = e.clientX; y = e.clientY; }); addEventListener("keydown", function(e) { if (e.ctrlKey && e.shiftKey && e.key === "I") { clearInterval(int); window.click = false; document.body.style.cursor = "default"; alert("Autoclicker deactivated! Click the bookmark again to reactivate!"); } else if (e.ctrlKey && e.shiftKey && e.key === "E") { var duration = prompt("Enter the duration in seconds:"); if (!duration || isNaN(duration)) { alert("You entered something wrong. Try again."); return; } setTimeout(function() { clearInterval(int); window.click = false; document.body.style.cursor = "default"; alert("Autoclicker deactivated! Click the bookmark again to reactivate!"); }, parseInt(duration) * 1000); } }); int = setInterval(function() { if (totalClicks > 0) { totalClicks--; return; } var e = document.elementFromPoint(x, y); e && e.click(); }, 1000 / cps); }})();