视频倍数

try to take over the world!

目前为 2020-10-18 提交的版本。查看 最新版本

// ==UserScript==
// @name         视频倍数
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  try to take over the world!
// @author       You
// @match        https://*/*
// @grant        none
// ==/UserScript==
(function() {
   document.onkeypress = function (e) {
            var video = document.querySelector('video');
            if (e.shiftKey) {
                if (e.key == 'v' || e.key == 'V') {
                    if (video == null) {
                        alert("未找到Video!");
                    } else {
                        var s = video.playbackRate;
                        var pro = prompt('请输入播放倍速:                    (当前播放倍数为:' + s + '倍速)');
                        if (parseFloat(pro) > 0 && parseFloat(pro) <= 10) {
                            var sp = parseFloat(pro);
                            console.log(sp);
                            video.playbackRate = sp;
                        }
                    }

                }
            }
        }
})();

QingJ © 2025

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