您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Greasy Fork is available in English.
try to take over the world!
当前为
// ==UserScript== // @name 百度网盘视频倍速播放-滑动条版 // @namespace http://tampermonkey.net/ // @version 0.1 // @description try to take over the world! // @author fajiao // @match *://pan.baidu.com/play/video* // @grant none // ==/UserScript== (function () { 'use strict'; function addLoadEvent(func) { var oldonload = window.onload; if (typeof window.onload != 'function') { window.onload = func; } else { window.onload = function () { oldonload(); func(); } } } function addSpeedbar() { var toolbar = document.querySelector(".video-toolbar-buttonbox"); var speedbar = document.createElement("input"); var speedtip = document.createElement("span"); if (!toolbar || !speedbar || !speedtip) { return; } toolbar.appendChild(speedbar); speedbar.type = "range"; speedbar.min = 0.5; speedbar.max = 2; speedbar.step = 0.05; speedbar.value = 1; toolbar.appendChild(speedtip); speedtip.style = "font-size:16px;font-weight:bold;color:black;"; speedtip.innerText = `x${speedbar.value}`; speedbar.addEventListener("input", function () { speedtip.innerText = `x${speedbar.value}`; }); speedbar.addEventListener("mouseup", function () { var html5player = window.videojs.getPlayers("video-player").html5player; if (html5player) { var speed = speedbar.value || 1.0; html5player.tech_.setPlaybackRate(speed); } }); } addLoadEvent(addSpeedbar); })();