diff --git a/Update.json b/Update.json index d28c065e..1877963c 100644 --- a/Update.json +++ b/Update.json @@ -3548,10 +3548,21 @@ "UpdateContents": [ { "PR": 969, - "Description": "Migrate XMOJ-BBS client endpoints to routes" + "Description": "Migrate XMOJ-BBS client endpoints to /v1 routes" } ], "Notes": "No release notes were provided for this release." + }, + "3.4.4": { + "UpdateDate": 1775973614570, + "Prerelease": true, + "UpdateContents": [ + { + "PR": 971, + "Description": "Fix loginpage.php Loop" + } + ], + "Notes": "Fix loginpage.php loop." } } } \ No newline at end of file diff --git a/XMOJ.user.js b/XMOJ.user.js index eecedc5c..428e738a 100644 --- a/XMOJ.user.js +++ b/XMOJ.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name XMOJ -// @version 3.4.3 +// @version 3.4.4 // @description XMOJ增强脚本 // @author @XMOJ-Script-dev, @langningchen and the community // @namespace https://github/langningchen @@ -912,6 +912,7 @@ GM_registerMenuCommand("重置数据", () => { //otherwise CurrentUsername might be undefined if (UtilityEnabled("AutoLogin") && document.querySelector("body > a:nth-child(1)") != null && document.querySelector("body > a:nth-child(1)").innerText == "请登录后继续操作") { + if (document.querySelector('a').innerText == "Please logout First!") location.href = localStorage.getItem("UserScript-LastPage"); localStorage.setItem("UserScript-LastPage", location.pathname + location.search); location.href = "https://www.xmoj.tech/loginpage.php"; } @@ -919,6 +920,7 @@ if (UtilityEnabled("AutoLogin") && document.querySelector("body > a:nth-child(1) let SearchParams = new URLSearchParams(location.search); let ServerURL = (UtilityEnabled("DebugMode") ? "https://ghpages.xmoj-bbs.me/" : "https://www.xmoj-bbs.me") if (document.querySelector("#profile") === null) { + if (document.querySelector('a').innerText == "Please logout First!") location.href = localStorage.getItem("UserScript-LastPage"); location.href = "https://www.xmoj.tech/loginpage.php"; } let CurrentUsername = document.querySelector("#profile").innerText; @@ -1184,6 +1186,7 @@ async function main() { } if (UtilityEnabled("AutoLogin") && document.querySelector("#profile") != null && document.querySelector("#profile").innerHTML == "登录" && location.pathname != "/login.php" && location.pathname != "/loginpage.php" && location.pathname != "/lostpassword.php") { + if (document.querySelector('a').innerText == "Please logout First!") location.href = localStorage.getItem("UserScript-LastPage"); localStorage.setItem("UserScript-LastPage", location.pathname + location.search); location.href = "https://www.xmoj.tech/loginpage.php"; } diff --git a/package.json b/package.json index 244106ae..c433e40d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xmoj-script", - "version": "3.4.3", + "version": "3.4.4", "description": "an improvement script for xmoj.tech", "main": "AddonScript.js", "scripts": {