-
-
Save asteriskman7/3e4114a8ff22f1eeee3a12a7d9f36b8b to your computer and use it in GitHub Desktop.
let _button=4; | |
let _ID; | |
document.body.addEventListener('mousedown', (e)=>{if(e.button===_button){_ID=_ID||setInterval(()=>e.target.click(),1)}}); | |
document.body.addEventListener('mouseup', (e)=>{if(e.button===_button){clearInterval(_ID);_ID=0}}); |
how do you use it
@BANANALEADER
Select the mouse button you want to use for autoclicking.
Modify line 1 if the button you want to use for autoclicking isn't button 4.
Paste the code into the console of the web page.
Hold down the button you've selected and it will be clicked rapidly as long as the button continues to be held on the page.
how do we type fast
This code doesn't let you type fast. It simulates mouse clicks.
This is really cool, thanks for making it.
@TheNeighboor You're welcome. Glad you're finding it useful.
for let _button=4;
what number would i use for right click?
Left click?
Pretty sure that left is 1 and right is 3. You can try a few values if your initial guess doesn't work as intended.
…
On Mon, Oct 17, 2022, 9:20 PM gottem87 @.> wrote: @.* commented on this gist. ------------------------------ for let _button=4; what number would i use for right click? Left click? — Reply to this email directly, view it on GitHub https://gist.github.com/3e4114a8ff22f1eeee3a12a7d9f36b8b#gistcomment-4339183, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACT57EPZXZXHAWL4DD6AE2DWDX3PPANCNFSM5P63WZCA . You are receiving this because you authored the thread.Message ID: @.***>
What about spacebar?
This code does not support using the keyboard to enable auto clicking.
It did not seem to work.
let _button=[3 and 1];
let _ID;
document.body.addEventListener('mousedown', (e)=>{if(e.button===_button){_ID=_ID||setInterval(()=>e.target.click(),1)}});
document.body.addEventListener('mouseup', (e)=>{if(e.button===_button){clearInterval(_ID);_ID=0}});
I was wrong about the button number mapping. The mapping is like this:
0 = left
1 = middle
2 = right
so full code is what
The full code is what is in the gist at the top. My mouse has more than 3 buttons so I used button 4. If you want to use another button, like the middle mouse button, you would replace the 4 on the first line with a 1.
any way to do on replit
so I don't have to do inspect
help
please
I'm on managed cb
I can't say specifically for replit. I've never used it. But, if you put everything into one line and prefix it with "javascript:" and paste it into the browser's address bar and hit enter it should work just as good as putting it in the browser console:
javascript:let _button=4;let _ID;document.body.addEventListener('mousedown', (e)=>{if(e.button===_button){_ID=_ID||setInterval(()=>e.target.click(),1)}});document.body.addEventListener('mouseup', (e)=>{if(e.button===_button){clearInterval(_ID);_ID=0}});
it works LOLLLL. I used it on a cps test page and got a max of 175 and an average of 50
🎉
@BANANALEADER Select the mouse button you want to use for autoclicking. Modify line 1 if the button you want to use for autoclicking isn't button 4. Paste the code into the console of the web page. Hold down the button you've selected and it will be clicked rapidly as long as the button continues to be held on the page.
how do you get to that
Get to what? The console? On chrome desktop you can press F12 and select the "Console" tab. On other desktop browsers it's probably similar but you can google "How to open console for browser". On mobile browsers you probably can't and you probably aren't using a mouse on your mobile device so it doesn't matter anyway.
what