您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Dominate the web with your auto clicking powers! Install this script and this power is yours! Click Alt+M on a webpage to enable the autoclicker. Press Alt+M again to turn it off.
当前为
- // ==UserScript==
- // @name Super Auto Clicker
- // @namespace http://tampermonkey.net/
- // @version 1.6
- // @description Dominate the web with your auto clicking powers! Install this script and this power is yours! Click Alt+M on a webpage to enable the autoclicker. Press Alt+M again to turn it off.
- // @author GSRHackZ
- // @match *://*/*
- // @grant none
- // @icon https://image.flaticon.com/icons/svg/99/99188.svg
- // @license MIT
- // @compatible chrome
- // @compatible firefox
- // @compatible opera
- // @compatible safari
- // ==/UserScript==
- let x,y,set,cps=10;
- document.addEventListener('keyup',function(evt){
- if(evt.keyCode==77&&evt.altKey){
- if(!set==true){
- set=true;
- let inp=prompt("Please set your CPS value. Do not include symbols/letters in your response. Recommended Max : 100,000 cps");
- if(!isNaN(inp)&&inp.trim().length>0){
- if(inp>100000){
- let check=confirm(`${inp} CPS may crash your browser! Are you sure you would like to continue?`)
- if(check){
- alert("The CPS value has been set.");
- console.warn("Please note that this may crash your browser.");
- cps=inp;
- }
- else{
- set=false;
- alert("Click Alt+M to set the CPS setting again.")
- }
- }
- else if(inp<1000){
- cps=1000;
- }
- else{
- cps=inp;
- }
- }
- alert("You may now click on any point in this tab to lock the autoclicker to it. Have fun!");
- onmousedown = function(e){
- x=e.clientX;
- y=e.clientY;
- };
- let autoClick=setInterval(function(){
- if(x!==undefined&&y!==undefined&&set==true){
- for(let i=0;i<cps/1000;i++){
- click(x,y);
- }
- }
- },1)}
- else{
- set=false
- }
- }
- })
- function click(x, y){
- let ev = new MouseEvent('click', {
- 'view': window,
- 'bubbles': true,
- 'cancelable': true,
- 'screenX': x,
- 'screenY': y
- });
- let el = document.elementFromPoint(x, y);
- el.dispatchEvent(ev);
- }