🎉 欢迎访问GreasyFork.Org 镜像站!本镜像站由公众号【爱吃馍】搭建,用于分享脚本。联系邮箱📮

Greasy fork 爱吃馍镜像

📂 缓存分发状态(共享加速已生效)
🕒 页面同步时间:2026/01/29 20:27:16
🔄 下次更新时间:2026/01/29 21:27:16
手动刷新缓存

ClickScript

用于巨量百应直播中控台自动点击讲解脚本

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

🚀 安装遇到问题?关注公众号获取帮助

公众号二维码

扫码关注【爱吃馍】

回复【脚本】获取最新教程和防失联地址

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

🚀 安装遇到问题?关注公众号获取帮助

公众号二维码

扫码关注【爱吃馍】

回复【脚本】获取最新教程和防失联地址

// ==UserScript==
// @name         ClickScript
// @namespace    http://tampermonkey.net/
// @version      2024-9-20
// @description  用于巨量百应直播中控台自动点击讲解脚本
// @author       Hershey
// @match        https://buyin.jinritemai.com/dashboard/live/control?*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=jinritemai.com
// @grant        none

// ==/UserScript==

"use strict";

let link1XPath='//div[@class="goodsItem-KBGOY5 rpa_lc__live-goods__goods-item"][1]'
let link2XPath='//div[@class="goodsItem-KBGOY5 rpa_lc__live-goods__goods-item"][2]'
let link3XPath='//div[@class="goodsItem-KBGOY5 rpa_lc__live-goods__goods-item"][3]'
let link4XPath='//div[@class="goodsItem-KBGOY5 rpa_lc__live-goods__goods-item"][4]'

class ClickScript {
    constructor() {
        this.init()
    }

    init() {
        this.start()
    }

    start() {
        this.click()
    }

    //自动每隔15s点击两次
    click() {
        let result = document.evaluate(link1XPath, document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null);
        const btn = result.singleNodeValue;
        if (btn) {
            // 第一次点击
            btn.click();
            console.log("Clicked button.");

            // 在1秒后进行第二次点击
            setTimeout(() => {
                if (btn) {
                    btn.click();
                    console.log("Clicked button again.");
                }
            }, 1000); // 1秒后点击第二次
        }

        // 15秒后再次调用 click(),即每隔15秒点击两次
        setTimeout(() => {
            this.click();
            console.log("Waiting for 15 seconds.");
        }, 15000);
    }
}

(function() {
    window.addEventListener("load", () => {
        // 每隔1秒检查元素是否加载
        const interval = setInterval(() => {
            const targetButton = document.querySelector("button.auxo-btn.auxo-btn-primary");
            if (targetButton) {
                console.log("找到按钮元素!");
                clearInterval(interval); // 找到后停止检查
                //加载自动点击函数
                new ClickScript();
            }
            else {
                console.log("未找到按钮元素!");
            }
        }, 5000);
    });
})();