您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Automatically clicks the element with id "nextTop" every 30-40 seconds randomly on the specified webpage.
// ==UserScript== // @name Auto Click NextTop // @namespace http://tampermonkey.net/ // @version 0.1 // @description Automatically clicks the element with id "nextTop" every 30-40 seconds randomly on the specified webpage. // @author wch // @match http://wap.xiaoyuananquantong.com/* // @grant none // @license MIT // ==/UserScript== (function() { 'use strict'; // Function to generate random interval between 30-40 seconds in milliseconds function getRandomInterval() { return Math.floor(Math.random() * (40 - 30 + 1) + 30) * 1000; } // Function to perform the click and schedule the next one function autoClick() { var element = document.getElementById('nextTop'); if (element) { element.click(); console.log('Clicked the nextTop element!'); } else { console.log('nextTop element not found.'); } // Schedule the next click setTimeout(autoClick, getRandomInterval()); } // Start the auto-click after the page loads window.addEventListener('load', function() { autoClick(); }); })();