hnai

Supports English and Chinese based on user language settings.

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

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

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 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");

})();