Chaoxing Fuck

Play Chaoxing course videos at 10x speed.

Du musst eine Erweiterung wie Tampermonkey, Greasemonkey oder Violentmonkey installieren, um dieses Skript zu installieren.

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

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

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

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

Sie müssten eine Skript Manager Erweiterung installieren damit sie dieses Skript installieren können

(Ich habe schon ein Skript Manager, Lass mich es installieren!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         Chaoxing Fuck
// @name:zh-CN   Chaoxing Fuck
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  Play Chaoxing course videos at 10x speed.
// @description:zh-cn 十倍速播放超星学系统视频
// @author       You
// @match        https://mooc1.chaoxing.com/mycourse/studentstudy?*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=chaoxing.com
// @grant        none
// @license MIT
// ==/UserScript==

(function() {
    'use strict';

    function block(eventName, window) {
        window.addEventListener(eventName, (event) => {
            event.stopImmediatePropagation();
        }, true);
    }

    block('mouseout', window);
    setTimeout(() => {
        const title = document.querySelector('.prev_title');
        title.innerHTML += " fucked";
        const framedWindow = document.querySelector('iframe').contentWindow.document.querySelector('iframe').contentWindow;
        const framedDoc = framedWindow.document;
        block('ratechange', framedWindow);
        const videoEle = framedDoc.querySelector('#video_html5_api');
        const playBtn = framedDoc.querySelector('.vjs-big-play-button');
        playBtn.addEventListener('click', () => {
            setTimeout(() => {
                videoEle.playbackRate = 10;
                console.log('Fucked');
            }, 1000);
        });
    }, 1500);
})();