Greasy Fork

来自缓存

Greasy Fork is available in English.

追剧神器视频倍速播放脚本

看视频播放只有两倍速?,直接提升倍速播放,最高支持10倍

当前为 2021-02-04 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         追剧神器视频倍速播放脚本
// @namespace    http://tampermonkey.net/
// @version      1.0.1
// @description  看视频播放只有两倍速?,直接提升倍速播放,最高支持10倍
// @author       wll
// @require      https://cdn.bootcdn.net/ajax/libs/jquery/2.2.0/jquery.js
// @match        *://ke.qq.com/webcourse/index.html
// @match        *://www.bilibili.com/*
// @match        *://www.iqiyi.com/*
// @note         20-12-26 1.0.0 初版发布视频倍速播放
// ==/UserScript==

(function() {
    'use strict';

    var stepHtml='<input id="rangeId" type="number" step="0.1" min="0.1" max="10" value="1" style="z-index:999999;position:absolute;top:100px;right:100px;border:solid 1px;background-color:#E3EDCD;" />';
	$("body").prepend(stepHtml);

    window.setInterval(function(){
        let step = document.getElementById("rangeId").value||1.0;

        console.log("倍速播放方法启动中....."+step);

        var htmlVideo = $("video").length;

        if(htmlVideo > 0){

            var url = location.href;
            console.log("url-->"+url);

            if (url.indexOf('bilibili.com/video/') > 0) {
                //play video twice as fast
                document.querySelector('video').defaultPlaybackRate = 2.0;//默认两倍速播放
                document.querySelector('video').play();
            }

            // now play three times as fast just for the heck of it
            document.querySelector('video').playbackRate = step;//修改此值设置当前的播放倍数
        }else{
            console.log("当前视频不支持倍速播放.....(ಥ_ಥ) o(╥﹏╥)o");
        }

    },1000);

})();