cq_auto_script

private script

คุณจะต้องติดตั้งส่วนขยาย เช่น Tampermonkey, Greasemonkey หรือ Violentmonkey เพื่อติดตั้งสคริปต์นี้

คุณจะต้องติดตั้งส่วนขยาย เช่น Tampermonkey หรือ Violentmonkey เพื่อติดตั้งสคริปต์นี้

คุณจะต้องติดตั้งส่วนขยาย เช่น Tampermonkey หรือ Violentmonkey เพื่อติดตั้งสคริปต์นี้

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         cq_auto_script
// @namespace    skeleton
// @version      3.0.0
// @description  private script
// @author       skeleton
// @match        *://*.chaoxing.com/space/*
// @run-at       document-end
// @grant        unsafeWindow
// @license MIT
// ==/UserScript==
 
 
(function() {
 
    'use strict';
    setTimeout(()=>{
        const win = unsafeWindow.document.querySelector('iframe').contentWindow
        win.getStudied?.()

        setTimeout(()=>{
            // 随机看课
            const links = Array.from(win.document.querySelectorAll('.w_cournopadd .w_cour_txt a'))
            const count = parseInt(Math.random() * links.length)
            links[count]?.click()
        },10000)
    },5000)
})();