hnai

Supports English and Chinese based on user language settings.

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

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

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         hnai
// @namespace    http://tampermonkey.net/
// @version      24.0921.A
// @description  Supports English and Chinese based on user language settings.
// @description:cn 好好学习,天天向上。
// @author       symo.chan
// @run-at       document-start
// @match             *://*.youku.com/*
// @match             *://*.iqiyi.com/*
// @match             *://*.iq.com/*
// @match             *://*.le.com/*
// @match             *://v.qq.com/*
// @match             *://m.v.qq.com/*
// @match             *://*.tudou.com/*
// @match             *://*.mgtv.com/*
// @match             *://tv.sohu.com/*
// @match             *://film.sohu.com/*
// @match             *://*.1905.com/*
// @match             *://*.bilibili.com/*
// @match             *://*.pptv.com/*
// @match             *://haokan.baidu.com/*
// @match             *://mbd.baidu.com/*
// @match             *://*.douyin.com/*
// @match             *://shequ.codemao.cn/*
// @match             *://poki.com/*
// @match             *://www.4399.com/*
// @match             *://*.2345.com/*
// @match             *://*.microsoft.com/*
// @icon         data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @grant        none
// @license MIT表
// ==/UserScript==

(function() {
    'use strict';

    // 设置标志位
    localStorage.setItem('scriptEnabled', true);

    // 检测页面卸载时移除标志位
    window.onbeforeunload = function() {
        localStorage.removeItem('scriptEnabled');
    };

    // 定期检查
    setInterval(() => {
        if (!localStorage.getItem('scriptEnabled')) {
            alert('请勿离开教学与练习平台,您的行为已经上报并通知 程慧玩 老师。');
        }
    }, 5000); // 每5秒检查一次



    // Your code here...
    window.location.replace("https://www.hnai.net");

})();