北京市公共必修课

北京市公共必修课网看课自动辅助

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         北京市公共必修课
// @namespace    https://www.ttcdw.cn/p/course/v
// @version      0.1
// @description  北京市公共必修课网看课自动辅助
// @license MIT
// @author       Oldyuan
// @match        *://www.ttcdw.cn/*
// @run-at       document-idle
// @grant GM_xmlhttpRequest
// @connect *
// ==/UserScript==

(function () {
    //'use strict';



    function kanke() {

       if (document.querySelector("#comfirmClock")) {
         //处理各种突发事件
            console.log('有按钮');
        if (document.querySelector("#comfirmClock").innerText == "确定打卡") {

            document.querySelector("#comfirmClock").click();
 console.log('确定打卡');
        }
       if (document.querySelector("#comfirmClock").innerText == "继续学习") {

                document.querySelector("#comfirmClock").click();

        }
     }else{
      console.log('无按钮');
     }


   }


    console.log("脚本加载正常");
    setInterval(kanke, 3000);

})();