// ==UserScript== // @name NUIST 选课系统 Firefox 兼容 // @name:en NUIST Course Selection Firefox Fix // @namespace https://github.com/airline233/nuist-xsxk-ff // @version 1.0.0 // @description 伪装 Chrome User-Agent,让 Firefox 能正常打开南信大选课系统,避免浏览器检测导致的无限刷新 // @description:en Spoof Chrome User-Agent so Firefox can use NUIST course selection without endless refresh // @author airline233 // @homepage https://github.com/airline233/nuist-xsxk-ff // @supportURL https://github.com/airline233/nuist-xsxk-ff/issues // @match *://xsxk.nuist.edu.cn/* // @run-at document-start // @grant none // @license MIT // ==/UserScript== (function () { 'use strict'; // 伪装 UserAgent 为标准 Chrome,绕过 xsxk.nuist.edu.cn 的浏览器限制 const fakeUA = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36'; Object.defineProperty(navigator, 'userAgent', { get: function () { return fakeUA; }, }); })();