用video的bug来跳过进度条

Use the video bug to skip the progress bar

当前为 2024-08-04 提交的版本,查看 最新版本

// ==UserScript==
// @name         用video的bug来跳过进度条
// @namespace    http://tampermonkey.net/
// @version      1.34
// @description  Use the video bug to skip the progress bar
// @author       lvandy
// @match        *://*/*
// @license MIT
// @grant        none
// @run-at       document-end
// ==/UserScript==

javascript:(function() {
    var video = document.querySelector('video');
    if (video) {
        // 触发视频结束事件
        video.dispatchEvent(new Event('ended'));
        // 等待视频结束事件处理完成
        setTimeout(function() {
            // 设置视频的当前播放时间到120秒
            video.currentTime = 120;
        }, 100);
    }
})();

QingJ © 2025

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