Greasy Fork

Greasy Fork is available in English.

智慧树/知到|共享课课程十倍速

将1.5倍速调整为10倍速,切换视频后需要点击右上角按钮

当前为 2023-05-14 提交的版本,查看 最新版本

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         智慧树/知到|共享课课程十倍速
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  将1.5倍速调整为10倍速,切换视频后需要点击右上角按钮
// @author       ChatGPT
// @match        *://studyvideoh5.zhihuishu.com/*
// @grant        none
// @icon         https://www.zhihuishu.com/favicon.ico
// @license      MIT
// ==/UserScript==

(function() {
    'use strict';

    function updateSpeedElement() {
        var speedElement = document.querySelector('div.speedTab.speedTab15[rate="1.5"]');
        if (speedElement) {
            speedElement.setAttribute('rate', '10');
            speedElement.textContent = 'X 10';
        }
    }

function addButton() {
    var button = document.createElement('button');
    button.textContent = '执行脚本';
    button.style.position = 'fixed';
    button.style.top = '10px';
    button.style.right = '10px';
    button.style.zIndex = '9999';
    button.addEventListener('click', updateSpeedElement);
    document.body.appendChild(button);
}
    // 修改速度元素
    setTimeout(updateSpeedElement, 3000); // 3秒延迟

    // 添加按钮
    addButton();
})();