新华三大讲堂 | 页面多开 | 秒过视频

屏蔽鼠标移出弹窗(华三华为网络技术交流群:950175630)

// ==UserScript==
// @name 新华三大讲堂 | 页面多开 | 秒过视频
// @namespace https://www.yuque.com/h3cie/h3c
// @version 0.4.3
// @description 屏蔽鼠标移出弹窗(华三华为网络技术交流群:950175630)
// @author 皮皮仔、拯救世界的狗子(原)
// @match *://learning.h3c.com/volbeacon/study/activity/*
// @include *://learning.h3c.com/volbeacon/study/activity/*
// @grant none
// @license End-User License Agreement
// ==/UserScript==

window.onload = (function() {
    function createVideoSkipButton() {
        var buttonDiv = document.createElement("div");
        buttonDiv.className = "video-skip-button";
        buttonDiv.style.position = "absolute";
        buttonDiv.style.top = "2%";
        buttonDiv.style.left = "85%";
        buttonDiv.style.backgroundColor = "lightblue";
        buttonDiv.style.padding = "10px";

        var skipButton = document.createElement("button");
        skipButton.innerText = "视频秒过 | 慎用";
        buttonDiv.appendChild(skipButton);
        document.body.appendChild(buttonDiv);

        skipButton.addEventListener("click", function() {
            var videoLengthElement = document.getElementById("videoLength");
            if (videoLengthElement) {
                videoLengthElement.value = 9000;
                console.log("视频长度已设置为9000秒");
            } else {
                console.error("未找到视频长度元素");
            }
        });
    }

    function stopIntervals() {
        clearInterval(vLooper);
        clearInterval(vChange);
        pausePrompt();
        console.log("定时器和提示已停止");
    }

    createVideoSkipButton();
    stopIntervals();
})();