Greasy Fork

Greasy Fork is available in English.

请求服务器连接

请求服务器不要中断

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         请求服务器连接
// @namespace    http://tampermonkey.net/
// @version      0.7
// @description  请求服务器不要中断
// @author       rick
// @match        *://*/*
// @icon         data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @grant        none
// @require      https://cdn.jsdelivr.net/npm/[email protected]/dist/jquery.min.js
// @license MIT
// ==/UserScript==

(function() {
   $(function () {
        setTimeout(() => {
          getClick();
        }, 5000);
        function getClick() {
          let addStr = `<div id="app">
        <div class="box">
          <label for="trigger-select">选择机子号码:</label>
          <select name="trigger" id="trigger-select">
            <option value="1">1号机</option>
            <option value="2">2号机</option>
            <option value="3">3号机</option>
          </select>
        </div>
        <div class="box">
          <label for="time-select">请选择间隔时间:</label>
          <select name="timer" id="time-select">
            <option value="5">5s</option>
            <option value="10">10s</option>
            <option value="15">15s</option>
          </select>
        </div>
        <button id="btn">确定</button>
      </div>
          `;
          let btn = document.querySelector("#btn");
          let warp = document.querySelector(".content-wrap");
          let ele = document.createElement("div");
          ele.innerHTML = addStr;
          warp.append(ele);
          btn.onclick = function () {
            let trigger = parseInt(
                document.querySelector("#trigger-select").value
              ),
              time =
                parseInt(document.querySelector("#time-select").value) * 1000;
          };
          function autoClick(trigger, time) {
            if (trigger == 1) {
              trigger == 0;
            }
            if (trigger == 2) {
              trigger == 3;
            }
            if (trigger == 3) {
              trigger == 6;
            }
            console.log(trigger, time);
            let dom =
              document.getElementsByClassName("operation-text")[trigger];
            setInterval(() => {
              if (dom.innerText == "运行") {
                dom.click();
              }
            }, time);
          }
        }
      });
})();