Greasy Fork

思纽教育(自动播放 | 自动换课)

遵义医科大、广西医科大、广西科技大等使用思纽系统的基本都适用!秒刷版演示:https://www.bilibili.com/video/BV1JSyfYSESU/?share_source=copy_web&vd_source=9f442269ba450b5e8b36838905d9ce79

目前为 2024-11-05 提交的版本。查看 最新版本

// ==UserScript==
// @name         思纽教育(自动播放 | 自动换课)
// @version      1.0
// @description  遵义医科大、广西医科大、广西科技大等使用思纽系统的基本都适用!秒刷版演示:https://www.bilibili.com/video/BV1JSyfYSESU/?share_source=copy_web&vd_source=9f442269ba450b5e8b36838905d9ce79
// @author       白衬(微信:XLTK-88)
// @match        *://*.edueva.org/*
// @icon         http://www.isiniu.com/img/logo/logo.png
// @grant        none
// @namespace https://greasyfork.org/users/973431
// ==/UserScript==

(function() {
    'use strict';

    const createStatusUI = () => {
        const statusPanel = document.createElement('div');
        statusPanel.id = 'autoPlayStatus';
        statusPanel.style.position = 'fixed';
        statusPanel.style.top = '10px';
        statusPanel.style.left = '10px';
        statusPanel.style.zIndex = '999999';
        statusPanel.style.padding = '10px';
        statusPanel.style.backgroundColor = '#D3D3D3';
        statusPanel.style.color = 'black';
        statusPanel.style.borderRadius = '5px';
        statusPanel.style.fontFamily = 'Arial, sans-serif';
        statusPanel.style.fontSize = '14px';
        statusPanel.style.display = 'none';
        statusPanel.style.lineHeight = '1.5';
        document.body.appendChild(statusPanel);
    };

    const getCourseTitle = () => {
        const courseTitleElement = document.querySelector('.play_title h2');
        return courseTitleElement ? courseTitleElement.textContent.trim() : '未知课程';
    };

   const updateStatusUI = (courseTitle) => {
    const statusPanel = document.getElementById('autoPlayStatus');
    if (statusPanel) {
        statusPanel.style.display = 'block';
        statusPanel.innerHTML = `
            <strong>当前课程为:</strong><span style="color: black;">《${courseTitle}》</span>
            <b>
            <strong>  当前状态:</strong><span style="color: green;">自动播放 | 自动换课</span>
            <br>
            <br>
            <strong>公告:</strong><span style="color: black; font-weight: normal;">各大高校继续教育网课请加微信:XLTK-88(欢迎各位老师、各大教育机构对接!承诺:挂科包赔!完美售后!视频、作业、考试等全包!)</span>
            </b>
        `;
    }
};

    const autoPlayVideo = () => {
        const video = document.querySelector('video');
        if (video && video.paused) {
            video.play();
        }


        const modal = document.querySelector('.layui-layer-btn0');
        if (modal) {
            modal.click();
        }
    };

    createStatusUI();

    const courseTitle = getCourseTitle();

    updateStatusUI(courseTitle);

    setInterval(() => {
        autoPlayVideo();
    }, 1000);
})();