Greasy Fork is available in English.

为全员培训播放器增加倍速按钮

培训的视频播放器,没有倍速功能,加了个按钮.

// ==UserScript==
// @name         为全员培训播放器增加倍速按钮
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  培训的视频播放器,没有倍速功能,加了个按钮.
// @author       You
// @match        https://hbt.gpa.enetedu.com/Common/RecordPlayBack*
// @icon         https://www.google.com/s2/favicons?domain=enetedu.com
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    function go()
    {
        // Your code here...
        var a=document.createElement("button");

        var x=document.createTextNode("1倍速");
        a.appendChild(x);
        a.style="    position: absolute;    z-index: 9999;    top: 0;    left: 40px;"
        a.onclick=function (){document.querySelector("video").playbackRate=1;}


        document.querySelector(".videoCourse").append(a);

        a=document.createElement("button");

        x=document.createTextNode("2倍速");
        a.appendChild(x);
        a.style="    position: absolute;    z-index: 9999;    top: 0;    left: 0px;"
        a.onclick=function (){document.querySelector("video").playbackRate=2;}

        document.querySelector(".videoCourse").append(a);




    }
    setTimeout(go,3000)
})();