您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
屏蔽鼠标移出弹窗
// ==UserScript== // @name 新华三大讲堂 | 秒过 | 屏蔽弹窗 // @version 0.0.1 // @description 屏蔽鼠标移出弹窗 // @author Clackz、皮皮仔&拯救世界的狗子(原) // @match *://learning.h3c.com/volbeacon/study/activity/* // @include *://learning.h3c.com/volbeacon/study/activity/* // @grant none // @license MIT // @namespace https://greasyfork.org/users/411879 // ==/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(tCourse); console.log("定时器已停止"); } function preventPauseOnBlur() { var originalHasFocus = document.hasFocus; document.hasFocus = function() { return true; }; console.log("已屏蔽鼠标移出弹窗"); } createVideoSkipButton(); stopIntervals(); preventPauseOnBlur(); })();