北化网课

Fuck the world

目前为 2023-03-15 提交的版本。查看 最新版本

// ==UserScript==
// @name         北化网课
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  Fuck the world
// @author       Snowman
// @match        https://buct.yuketang.cn/pro/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=yuketang.cn
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    function closeWindow(){
        var userAgent = navigator.userAgent;
        if (userAgent.indexOf("Firefox") != -1 || userAgent.indexOf("Chrome") !=-1) {
            window.location.href="about:blank";
            window.close();
        } else {
            window.opener = null;
            window.open("", "_self");
            window.close();
        }
    }

    document.hasFocus = i => true;
    var el;

    setTimeout(()=>{
        document.querySelector("#app > div.app-wrapper > div.wrap > div.viewContainer.heightAbsolutely > div > div.video-wrap > div.box > div > section.title > div.title-fl").innerHTML +=
            `<font style="color:green;">(已黑化)</font>`
        el = document.querySelector("#app > div.app-wrapper > div.wrap > div.viewContainer.heightAbsolutely > div > div.video-wrap > div.box > div > section.title > div.title-fr > div > div > span");
        console.log("完成了喵~");
    },1000);

    setInterval(()=>{
        let n = Number(el.innerText.slice(4,-1));
        if (n >= 100) {
            closeWindow();
        }
    }, 1000)
    // Your code here...
})();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址