您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
自动静音视频,模拟视频播放结束
当前为
// ==UserScript== // @name 智慧中小学平台|2025寒假研修|脚本已效 // @namespace http://tampermonkey.net/ // @version 0.4 // @license V+Adxm0001 // @description 自动静音视频,模拟视频播放结束 // @author 天道酬勤 // @match https://basic.smartedu.cn/* // @match https://www.smartedu.cn/* // @match https://teacher.vocational.smartedu.cn/* // @match https://core.teacher.vocational.smartedu.cn/* // ==/UserScript== (function() { 'use strict'; setInterval(function() { var v = document.getElementsByTagName('video')[0]; if (v) { v.currentTime = v.duration; } }, 1000); function runCodeInPage(code) { var script = document.createElement('script'); script.textContent = code; (document.head || document.documentElement).appendChild(script); // 由于在插入文档后立即执行并移除,这里无需手动调用remove方法 // script.remove(); } document.addEventListener('click', function(event) { if (event.button === 0) { setTimeout(function() { runCodeInPage(` var videoElement = document.querySelector("video"); if (videoElement) { videoElement.dispatchEvent(new Event("ended")); videoElement.muted = true; videoElement.playbackRate = 1.8; videoElement.play(); } `); }, 200); } }); })(); (function() { 'use strict'; let counter = 0; let intervalId; function skipVideos() { document.querySelectorAll('video').forEach(video => { video.currentTime = video.duration; counter++; }); if (counter >= 6) { clearInterval(intervalId); counter = 0; } } function startSkip() { clearInterval(intervalId); intervalId = setInterval(skipVideos, 100); } function removeUnwantedElements() { document.querySelectorAll('div[data-v-046f3ed2][data-v-0a3aef71].dialog-layout, .index-module_fn_u6tnc') .forEach(element => element.remove()); } document.addEventListener('DOMContentLoaded', () => { removeUnwantedElements(); new MutationObserver(removeUnwantedElements).observe(document.body, { childList: true, subtree: true }); }); document.body.addEventListener('click', startSkip); })();