# https://tap.eclipse.xyz/养牛脚本 **Published by:** [zhanglu.eth](https://paragraph.com/@zhanglu/) **Published on:** 2024-12-30 **URL:** https://paragraph.com/@zhanglu/https-tap-eclipse-xyz ## Content 右键检查元素,点击控制台,粘贴脚本,enter键执行// 脚本源码在下面没有邀请码的这里还有3个:prwheA TtvAZ5 erYPRG图1 // 第一步:找到 <canvas> 元素 const canvasElement = document.querySelector('canvas'); if (canvasElement) { let clickCount = 0; // 当前点击次数 const maxClicks = 10000; // 最大点击次数,可以根据需要修改 // 第二步:创建一个函数来模拟点击 const simulateClick = () => { // 创建一个点击事件 const clickEvent = new MouseEvent('click', { bubbles: true, // 确保事件会冒泡 cancelable: true, // 允许事件取消 view: window, // 使事件感知到窗口的上下文 }); // 派发事件到 canvas 元素 canvasElement.dispatchEvent(clickEvent); // console.log(`模拟点击次数:${clickCount + 1}`); clickCount++; // 增加点击次数 // 如果点击次数达到最大值,清除定时器 if (clickCount >= maxClicks) { clearInterval(intervalId); // 停止定时器 console.log('达到最大点击次数,停止模拟点击'); } }; // 第三步:每 0.1 秒执行一次点击 const intervalId = setInterval(simulateClick, 300); // 100ms = 0.1s } else { console.error('未找到 canvas 元素'); } ## Publication Information - [zhanglu.eth](https://paragraph.com/@zhanglu/): Publication homepage - [All Posts](https://paragraph.com/@zhanglu/): More posts from this publication - [RSS Feed](https://api.paragraph.com/blogs/rss/@zhanglu): Subscribe to updates - [Twitter](https://twitter.com/Craaie1): Follow on Twitter