感谢豆包元宝制裁许昌校区晚自习(一)

当打开https://mobilelearn.chaoxing.com/widget/sign/signIn?activeId=*&ewnCode=* 时,自动跳转到 https://mobilelearn.chaoxing.com/widget/sign/refreshEwn?activeId=*

// ==UserScript==
// @name         感谢豆包元宝制裁许昌校区晚自习(一)
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  当打开https://mobilelearn.chaoxing.com/widget/sign/signIn?activeId=*&ewnCode=* 时,自动跳转到 https://mobilelearn.chaoxing.com/widget/sign/refreshEwn?activeId=*
// @author       You
// @match       https://mobilelearn.chaoxing.com/widget/sign/signIn?activeId=*&ewnCode=*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    // 解析当前 URL 的参数
    const urlParams = new URLSearchParams(window.location.search);
    // 获取 activeId 的值
    const activeId = urlParams.get('activeId');

    if (activeId) {
        // 构建要跳转的 URL
        const targetUrl = `https://mobilelearn.chaoxing.com/widget/sign/refreshEwn?activeId=${activeId}`;
        // 进行页面跳转
        window.location.href = targetUrl;
    }
})();