Greasy Fork is available in English.

秒过2024年智慧中小学暑假教师研修,每个视频多点几遍,疯狂点鼠标左键

2024年智慧中小学暑假教师研修,秒过,每个视频多点几遍,疯狂点鼠标左键。有问题可以联系我https://space.bilibili.com/15344563。其他人均为假冒,不要相信。刷课效果可以见https://www.bilibili.com/video/BV19f421q7hA

// ==UserScript==
// @name         秒过2024年智慧中小学暑假教师研修,每个视频多点几遍,疯狂点鼠标左键
// @namespace    http://tampermonkey.net/
// @version      0.64
// @author       hydrachs
// @description  2024年智慧中小学暑假教师研修,秒过,每个视频多点几遍,疯狂点鼠标左键。有问题可以联系我https://space.bilibili.com/15344563。其他人均为假冒,不要相信。刷课效果可以见https://www.bilibili.com/video/BV19f421q7hA
// @license MIT
// @match        https://basic.smartedu.cn/*
// @match        https://www.smartedu.cn/*
// @match        https://teacher.vocational.smartedu.cn/*
// @match        https://core.teacher.vocational.smartedu.cn/*
// ==/UserScript==

(function() {
    'use strict';

    // 创建弹簧
    function createPopup(message1, message2, message3, message4, message5, message6) {
        const modal = document.createElement('div');
        modal.style.position = 'fixed';
        modal.style.top = '20%';
        modal.style.left = '20%';
        modal.style.width = '60%'; // 调整肥度为60%
        modal.style.height = 'auto'; // 高度自动调整
        modal.style.backgroundColor = '#fff';
        modal.style.padding = '20px';
        modal.style.borderRadius = '5px';
        modal.style.boxShadow = '0 0 10px rgba(0,0,0,0.5)';
        modal.style.zIndex = '9999';

        const text1 = document.createElement('p');
        text1.style.color = 'red';
        text1.style.fontSize = '28px';
        text1.textContent = message1;
        text1.style.textAlign = 'center';
        text1.style.marginBottom = '10px';

        const text2 = document.createElement('p');
        text2.textContent = message2;
        text2.style.fontSize = '19px';
        text2.style.marginBottom = '10px';

        const text3 = document.createElement('p');
        text3.textContent = message3;
        text3.style.fontSize = '19px';
        text3.style.marginBottom = '10px';

        const text4 = document.createElement('p');
        text4.textContent = message4;
        text4.style.fontSize = '19px';
        text4.style.marginBottom = '10px';

        const text5 = document.createElement('p');
        text5.textContent = message5;
        text5.style.fontSize = '19px';
        text5.style.marginBottom = '10px';

        const text6 = document.createElement('p');
        text6.textContent = message6;
        text6.style.textAlign = 'right';
        text6.style.fontSize = '25px';
        text6.style.marginBottom = '10px';

        const button = document.createElement('button');
        button.textContent = '我知道了';
        button.style.padding = '5px 10px';
        button.style.cursor = 'pointer';
        button.onclick = function() {
            modal.remove();
        };

        const buttonContainer = document.createElement('div');
        buttonContainer.style.display = 'flex';
        buttonContainer.style.justifyContent = 'center';
        buttonContainer.style.alignItems = 'center';
        buttonContainer.style.marginTop = '10px';

        buttonContainer.appendChild(button);
        modal.appendChild(text1);
        modal.appendChild(text2);
        modal.appendChild(text3);
        modal.appendChild(text4);
        modal.appendChild(text5);
        modal.appendChild(text6);
        modal.appendChild(buttonContainer);

        document.body.appendChild(modal);
    }

    // 创建暗影
    function createContactButton() {
        const button = document.createElement('button');
        button.textContent = '联系脚本作者';
        button.style.position = 'fixed';
        button.style.top = '10px';
        button.style.right = '10px';
        button.style.zIndex = '10000';
        button.style.padding = '10px 20px';
        button.style.border = 'none';
        button.style.backgroundColor = '#ff0000'; // 设置背景颜色为红色,辣眼睛配色
        button.style.color = '#ffd700'; // 设置字体颜色为黄色
        button.style.fontWeight = 'bold';
        button.style.cursor = 'pointer';
        button.onclick = function() {
            window.open('https://space.bilibili.com/15344563', '_blank');
        };

        document.body.appendChild(button);
    }

    // 弹弹弹
    createPopup('不支持高校、职教版本', '提示:', '1.使用方法:点开视频,鼠标快速点几次空白处或者暂停/播放键,然后观察进度条是否跳转到最后几秒,如果跳过去了,等待视频播放完成即可。如果进度条还在前面,再次快速点几次空白处或者暂停/播放键,直到进度条跳转到最后几秒;', '2.此脚本永久免费,以前、现在、未来都免费,谨防上当受骗;', '3.有问题可以点右上角的“联系脚本作者”;', '———hydrachs');
    createContactButton();

    function removePopup() {
        var popup = document.querySelector('.fish-modal-confirm-btns');
        if (popup) {
            popup.parentNode.removeChild(popup);
            console.log('出现知道了按钮');
        }
    }

    function removeNewPopup() {
        var newPopup = document.querySelector('.fish-modal-content');
        if (newPopup) {
            newPopup.parentNode.removeChild(newPopup);
            console.log('移除弹窗2');
        }
    }

    function skipVideo() {
        let video = document.querySelector('video');
        if (video) {
            video.muted = true; // 设置噪音
            video.play();
            video.pause();
            video.currentTime = video.duration;
            video.play();
            setTimeout(700);
            video.currentTime = video.duration - 3;
            video.play();
            video.currentTime = video.duration - 5;
            video.play();
        }
    }

    // 海豚音播放视频
    function skipVideo2() {
        let video = document.querySelector('video');
        if (video) {
            video.muted = true;
            video.play();
        }
    }

    function rapidSkip(times, interval) {
        let count = 0;
        const intervalId = setInterval(() => {
            if (count >= times) {
                clearInterval(intervalId);
                return;
            }
            skipVideo();
            count++;
        }, interval);
    }

    let clickTimer;

    document.addEventListener('DOMContentLoaded', function() {
        removePopup();
        removeNewPopup();
        console.log('移除弹窗');
    });

    document.addEventListener('click', function(event) {
        if (event.button === 0) {
            if (clickTimer) {
                clearInterval(clickTimer);
            }
            rapidSkip(4, 50);
            clickTimer = setInterval(() => {
                rapidSkip(4, 50);
            }, 8000); 
        }
    });

})();