Greasy Fork is available in English.

内蒙古干部网络学院

离开页面时自动点击继续学习,持续播放视频

// ==UserScript==
// @name         内蒙古干部网络学院
// @namespace    http://tampermonkey.net/
// @version      0.1.4
// @description  离开页面时自动点击继续学习,持续播放视频
// @author       AN drew
// @match        *://wlxy.nmgdj.gov.cn/*
// @exclude      *://wlxy.nmgdj.gov.cn/special/*
// @require      https://lib.baomitu.com/jquery/3.5.0/jquery.min.js
// @grant        GM_addStyle
// ==/UserScript==

(function() {
    'use strict';

    if(window.location.href.indexOf('wlxy.nmgdj.gov.cn/detail') > -1)
    {
        setInterval(function(){
            if($('div[role="alertdialog"] .next-btn').length>0)
            {
                $('div[role="alertdialog"] .next-btn').click();
            }

            if($('.xgplayer-time-current').text()==$('.xgplayer-time-current+span').text())
            {
                $('title').text('【播放完成】内蒙古干部网络学院')
            }
        },3000)
    }
    GM_addStyle(`
    [class="$id--option_key--LHu7jB9"] {background:#8080804d;}
    [class="$id--option_key--DNJl9Td"] {background:#8080804d;}
    `);

})();