New Userscript

英盛网刷课脚本

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 or Violentmonkey 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         New Userscript
// @namespace    http://tampermonkey.net/
// @version      2025-01-24
// @author       howardnm
// @description  英盛网刷课脚本
// @license MIT
// @match        https://qy.yingsheng.com/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=yingsheng.com
// @grant        none
// ==/UserScript==

const selector = 'a[data-v-8ae46a44][data-dismiss="modal"]';

let checkInterval = setInterval(() => {
    const button = document.querySelector(selector);
    if (button) {
        console.log('找到按钮:', button);
        setTimeout(() => {
            button.click();
            console.log('按钮已点击');
            // clearInterval(checkInterval); // 点击后停止轮询
        }, 2000); // 延迟 2 秒后点击
    } else {
        console.log('仍未找到按钮,继续检查...');
    }
}, 1000); // 每隔 1 秒检查一次