Greasy Fork

Greasy Fork is available in English.

倍速播放视频(最高16倍)。支持国家中小学智慧教育平台、国家职业教育智慧平台

倍速播放看 国家中小学智慧教育平台的视频、国家职业教育智慧平台

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         倍速播放视频(最高16倍)。支持国家中小学智慧教育平台、国家职业教育智慧平台
// @namespace    http://tampermonkey.net/
// @version      0.2
// @description  倍速播放看 国家中小学智慧教育平台的视频、国家职业教育智慧平台
// @author       sunsikai
// @match        *://*.zxx.edu.cn/*
// @match        *://*.smartedu.cn/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=zxx.edu.cn
// @require      http://greasyfork.icu/scripts/425166-elegant-alert-%E5%BA%93/code/elegant%20alert()%E5%BA%93.js?version=922763
// @grant        none
// @license      MIT
// ==/UserScript==

(function() {
    'use strict';

    let Container = document.createElement('div');
    Container.id = "sp-ac-container";
    Container.style.position="fixed"
    Container.style.left="20px"
    Container.style.top="20px"
    Container.style['z-index']="999999"
    Container.innerHTML =`<button id="one" style="position:absolute; left:10x; top:10">
  播放速度调节
</button>
`
    //绑定按键点击功能
	Container.onclick = function (){
        //为所欲为 功能实现处
        if(document.querySelector('video').playbackRate==1){
            document.querySelector('video').playbackRate = 2;
            new ElegantAlertBox("播放速度2倍")
            return;
        }else if(document.querySelector('video').playbackRate==2){
            document.querySelector('video').playbackRate = 4;
            new ElegantAlertBox("播放速度4倍")
            return;
        }else if(document.querySelector('video').playbackRate==4){
            document.querySelector('video').playbackRate = 8;
            new ElegantAlertBox("播放速度8倍")
            return;
        }else if(document.querySelector('video').playbackRate==8){
            document.querySelector('video').playbackRate = 16;
            new ElegantAlertBox("播放速度16倍")
            return;
        }else {
            document.querySelector('video').playbackRate = 1;
            new ElegantAlertBox("播放速度1倍")
            return;
        }
	};
    document.body.appendChild(Container);
    // Your code here...
})();