中国大学mooc_破解按键屏蔽与倍速播放

try to take over the world!

目前為 2020-09-09 提交的版本,檢視 最新版本

// ==UserScript==
// @name         中国大学mooc_破解按键屏蔽与倍速播放
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  try to take over the world!
// @author       kakasearch
// @match        https://www.icourse163.org/learn/*
// @run-at       document-end
// ==/UserScript==

(function() {
    'use strict';
    if (/content/.test(window.location.href)){
    console.log('loaded')
     document.body.onkeydown = function (event) {
 if (window.event) {
 return event;
}

     }
       document.body.onkeydown = function(ev){
            var e = ev || event;
            if(e.keyCode ==67){
                document.getElementsByTagName('video')[0].playbackRate += 0.1
    document.querySelector("#g-body > div.m-learnhead > div > div.f-fl.info > div > a.f-fl > h4").innerText =document.getElementsByTagName('video')[0].playbackRate.toFixed(1)
            }else if(e.keyCode ==88){
                     document.getElementsByTagName('video')[0].playbackRate -= 0.1
    document.querySelector("#g-body > div.m-learnhead > div > div.f-fl.info > div > a.f-fl > h4").innerText =document.getElementsByTagName('video')[0].playbackRate.toFixed(1)
}
                     }


    // Your code here...
}
})();

QingJ © 2025

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