// ==UserScript== // @name Video Manipulator and Modal Remover // @namespace http://tampermonkey.net/ // @version 0.2 // @description Manipulate video elements and remove modal on web pages // @author Alcex // @match *://*.zxx.edu.cn/* // @match *://*.smartedu.cn/* // @grant none // @license MIT // @downloadURL none // ==/UserScript== (function() { 'use strict'; function manipulateVideo() { var v = document.querySelector("video"); if (v) { v.dispatchEvent(new Event("ended")); v.muted = true; v.currentTime = Math.floor(v.duration); v.play(); } // 1秒后再次调用自身 setTimeout(manipulateVideo, 1000); } function removeModal() { var modal = document.querySelector(".fish-modal-root"); if (modal) { modal.remove(); } } // 开始循环 manipulateVideo(); // 移除模态框 removeModal(); })();