New Userscript

英盛网刷课脚本

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

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

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

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.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==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 秒检查一次