您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
点击视频空白处切换播放暂停,左右方向键控制5秒快进快退
当前为
// ==UserScript== // @name 延河课堂播放增强 // @namespace https://www.ordosx.tech/ // @version 1.1 // @description 点击视频空白处切换播放暂停,左右方向键控制5秒快进快退 // @author OrdosX // @match https://www.yanhekt.cn/session/* // @icon https://www.google.com/s2/favicons?domain=yanhekt.cn // @grant none // ==/UserScript== (function() { 'use strict'; window.addEventListener('load', () => { main() }) const main = () => { if (!(document.querySelector(".main-player video") && document.querySelector(".player-panel") && document.querySelector(".player-mask"))) { setTimeout(main, 20) } else { document.querySelector(".player-panel").onclick = () => { document.querySelector(".controller-panel .head-container button").click() } document.querySelector(".player-mask").onclick = () => { document.querySelector(".controller-panel .head-container button").click() } document.onkeydown = (e) => { switch(e.keyCode){ case 37: // 左方向键快退五秒 document.querySelector(".main-player video").currentTime -= 5 break case 39: // 右方向键快进5秒 document.querySelector(".main-player video").currentTime += 5 break case 32: // 空格暂停 document.querySelector(".controller-panel .head-container button").click() break } } } } })();