From 2db8eceb53bd1de43f747c2cff4c5aa6a7332def Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Sat, 11 Apr 2026 02:39:32 +0000
Subject: [PATCH 01/17] refactor: migrate backend calls to /v1 routes
Agent-Logs-Url: https://github.com/XMOJ-Script-dev/XMOJ-Script/sessions/606d7c42-f0ad-4d97-80ae-b8d92c2d6725
Co-authored-by: PythonSmall-Q <106425289+PythonSmall-Q@users.noreply.github.com>
---
XMOJ.user.js | 12 ++++++------
messages.html | 4 ++--
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/XMOJ.user.js b/XMOJ.user.js
index 4ae52ab6..65e95d61 100644
--- a/XMOJ.user.js
+++ b/XMOJ.user.js
@@ -505,7 +505,7 @@ let RequestAPI = (Action, Data, CallBack) => {
}
GM_xmlhttpRequest({
method: "POST",
- url: (UtilityEnabled("SuperDebug") ? "http://127.0.0.1:8787/" : "https://api.xmoj-bbs.me/") + Action,
+ url: (UtilityEnabled("SuperDebug") ? "http://127.0.0.1:8787/v1/" : "https://api.xmoj-bbs.me/v1/") + Action,
headers: {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
@@ -643,7 +643,7 @@ function ConnectNotificationSocket() {
return;
}
- let wsUrl = (UtilityEnabled("SuperDebug") ? "ws://127.0.0.1:8787" : "wss://api.xmoj-bbs.me") + "/ws/notifications?SessionID=" + Session;
+ let wsUrl = (UtilityEnabled("SuperDebug") ? "ws://127.0.0.1:8787" : "wss://api.xmoj-bbs.me") + "/v1/ws/notifications?SessionID=" + Session;
if (UtilityEnabled("DebugMode")) {
console.log("WebSocket: Connecting to", wsUrl);
@@ -5021,7 +5021,7 @@ int main()
"Image": Reader.result
}, (ResponseData) => {
if (ResponseData.Success) {
- Content.value = Before + `` + After;
+ Content.value = Before + `` + After;
Content.dispatchEvent(new Event("input"));
} else {
Content.value = Before + `![上传失败!` + ResponseData.Message + `]()` + After;
@@ -5277,7 +5277,7 @@ int main()
"Image": Reader.result
}, (ResponseData) => {
if (ResponseData.Success) {
- ContentElement.value = Before + `` + After;
+ ContentElement.value = Before + `` + After;
ContentElement.dispatchEvent(new Event("input"));
} else {
ContentElement.value = Before + `![上传失败!]()` + After;
@@ -5450,7 +5450,7 @@ int main()
"Image": Reader.result
}, (ResponseData) => {
if (ResponseData.Success) {
- ContentElement.value = Before + `` + After;
+ ContentElement.value = Before + `` + After;
ContentElement.dispatchEvent(new Event("input"));
} else {
ContentElement.value = Before + `![上传失败!]()` + After;
@@ -5708,7 +5708,7 @@ int main()
"Image": Reader.result
}, (ResponseData) => {
if (ResponseData.Success) {
- ContentEditor.value = Before + `` + After;
+ ContentEditor.value = Before + `` + After;
ContentEditor.dispatchEvent(new Event("input"));
} else {
ContentEditor.value = Before + `![上传失败!]()` + After;
diff --git a/messages.html b/messages.html
index ea7e2484..794b2d3f 100644
--- a/messages.html
+++ b/messages.html
@@ -367,8 +367,8 @@
用户信息
'use strict';
// ── Constants ──────────────────────────────────────────────────────────────
-const API_BASE = 'https://api.xmoj-bbs.me/';
-const ASSET_BASE = 'https://assets.xmoj-bbs.me/GetImage?ImageID=';
+const API_BASE = 'https://api.xmoj-bbs.me/v1/';
+const ASSET_BASE = 'https://assets.xmoj-bbs.me/v1/GetImage?ImageID=';
const XMOJ_BASE = 'https://www.xmoj.tech';
const WEBUI_VERSION = 'webui-1.0.0';
const STORAGE_USER = 'xmoj-msg-username';
From bf675238f0682fffd03ca1b5807d93b9ed1a7dc2 Mon Sep 17 00:00:00 2001
From: "github-actions[bot]"
Date: Sat, 11 Apr 2026 02:45:49 +0000
Subject: [PATCH 02/17] 3.4.3
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index dfcb7f1d..244106ae 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "xmoj-script",
- "version": "3.4.2",
+ "version": "3.4.3",
"description": "an improvement script for xmoj.tech",
"main": "AddonScript.js",
"scripts": {
From cb3db4a9a67de31638d6ba75b3deffe7bc000acc Mon Sep 17 00:00:00 2001
From: "github-actions[bot]"
Date: Sat, 11 Apr 2026 02:45:56 +0000
Subject: [PATCH 03/17] Update version info to 3.4.3
---
Update.json | 11 +++++++++++
XMOJ.user.js | 2 +-
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/Update.json b/Update.json
index 1103a1bd..7e7d1d25 100644
--- a/Update.json
+++ b/Update.json
@@ -3541,6 +3541,17 @@
}
],
"Notes": "Add hourly automatic cloud settings sync. Every hour, if CloudSync is enabled, settings are downloaded from the cloud and applied locally, then local settings are uploaded to the cloud. This keeps settings in sync across devices without requiring a visit to the settings page."
+ },
+ "3.4.3": {
+ "UpdateDate": 1775875549804,
+ "Prerelease": true,
+ "UpdateContents": [
+ {
+ "PR": 969,
+ "Description": "Migrate XMOJ-BBS client endpoints to routes"
+ }
+ ],
+ "Notes": "No release notes were provided for this release."
}
}
}
\ No newline at end of file
diff --git a/XMOJ.user.js b/XMOJ.user.js
index 65e95d61..eecedc5c 100644
--- a/XMOJ.user.js
+++ b/XMOJ.user.js
@@ -1,6 +1,6 @@
// ==UserScript==
// @name XMOJ
-// @version 3.4.2
+// @version 3.4.3
// @description XMOJ增强脚本
// @author @XMOJ-Script-dev, @langningchen and the community
// @namespace https://github/langningchen
From 9afb3df53129424f7e795fb32e81f9f381f43d10 Mon Sep 17 00:00:00 2001
From: zsTree
Date: Sun, 12 Apr 2026 13:39:12 +0800
Subject: [PATCH 04/17] Update endpoint description in Update.json
Signed-off-by: zsTree
---
Update.json | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Update.json b/Update.json
index 7e7d1d25..53e484d4 100644
--- a/Update.json
+++ b/Update.json
@@ -3548,10 +3548,10 @@
"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."
}
}
-}
\ No newline at end of file
+}
From 5c6e3c5c815f1cbcb4a4591fa0273ac28dd266ab Mon Sep 17 00:00:00 2001
From: "github-actions[bot]"
Date: Sun, 12 Apr 2026 05:39:38 +0000
Subject: [PATCH 05/17] Update time and description of 3.4.3
---
Update.json | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/Update.json b/Update.json
index 53e484d4..d28c065e 100644
--- a/Update.json
+++ b/Update.json
@@ -3543,15 +3543,15 @@
"Notes": "Add hourly automatic cloud settings sync. Every hour, if CloudSync is enabled, settings are downloaded from the cloud and applied locally, then local settings are uploaded to the cloud. This keeps settings in sync across devices without requiring a visit to the settings page."
},
"3.4.3": {
- "UpdateDate": 1775875549804,
+ "UpdateDate": 1775972372292,
"Prerelease": true,
"UpdateContents": [
{
"PR": 969,
- "Description": "Migrate XMOJ-BBS client endpoints to /v1 routes"
+ "Description": "Migrate XMOJ-BBS client endpoints to routes"
}
],
"Notes": "No release notes were provided for this release."
}
}
-}
+}
\ No newline at end of file
From c24d3fcdde14dc447af6b0d8703a42dd2b19eba4 Mon Sep 17 00:00:00 2001
From: zsTree
Date: Sun, 12 Apr 2026 06:30:42 +0000
Subject: [PATCH 06/17] Fix loginpage.php Loop
---
XMOJ.user.js | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/XMOJ.user.js b/XMOJ.user.js
index eecedc5c..daba8d87 100644
--- a/XMOJ.user.js
+++ b/XMOJ.user.js
@@ -911,7 +911,9 @@ GM_registerMenuCommand("重置数据", () => {
});
//otherwise CurrentUsername might be undefined
+let logined = (document.querySelector('a').innerText == "Please logout First!");
if (UtilityEnabled("AutoLogin") && document.querySelector("body > a:nth-child(1)") != null && document.querySelector("body > a:nth-child(1)").innerText == "请登录后继续操作") {
+ if (logined) location.href = (localStorage.getItem("UserScript-LastPage") == null ? "/" : localStorage.getItem("UserScript-LastPage"));
localStorage.setItem("UserScript-LastPage", location.pathname + location.search);
location.href = "https://www.xmoj.tech/loginpage.php";
}
@@ -919,6 +921,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 (logined) location.href = (localStorage.getItem("UserScript-LastPage") == null ? "/" : localStorage.getItem("UserScript-LastPage"));
location.href = "https://www.xmoj.tech/loginpage.php";
}
let CurrentUsername = document.querySelector("#profile").innerText;
@@ -1184,6 +1187,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 (logined) location.href = (localStorage.getItem("UserScript-LastPage") == null ? "/" : localStorage.getItem("UserScript-LastPage"));
localStorage.setItem("UserScript-LastPage", location.pathname + location.search);
location.href = "https://www.xmoj.tech/loginpage.php";
}
From 02881c8534fa1a83c2ce05c397ced6dca4466fa9 Mon Sep 17 00:00:00 2001
From: "github-actions[bot]"
Date: Sun, 12 Apr 2026 06:35:21 +0000
Subject: [PATCH 07/17] 3.4.4
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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": {
From d825aee3da8facce093397d7652ecd3e365548bb Mon Sep 17 00:00:00 2001
From: "github-actions[bot]"
Date: Sun, 12 Apr 2026 06:35:27 +0000
Subject: [PATCH 08/17] Update version info to 3.4.4
---
Update.json | 11 +++++++++++
XMOJ.user.js | 2 +-
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/Update.json b/Update.json
index d28c065e..5b591f0b 100644
--- a/Update.json
+++ b/Update.json
@@ -3552,6 +3552,17 @@
}
],
"Notes": "No release notes were provided for this release."
+ },
+ "3.4.4": {
+ "UpdateDate": 1775975721817,
+ "Prerelease": true,
+ "UpdateContents": [
+ {
+ "PR": 973,
+ "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 daba8d87..49f4d563 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
From 95bdcd78a0cb93132c4b08cd84e699c759eebeb1 Mon Sep 17 00:00:00 2001
From: zsTree
Date: Sun, 12 Apr 2026 14:38:02 +0800
Subject: [PATCH 09/17] Refactor login check for clarity and efficiency
Signed-off-by: zsTree
---
XMOJ.user.js | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/XMOJ.user.js b/XMOJ.user.js
index 49f4d563..1eb05d4a 100644
--- a/XMOJ.user.js
+++ b/XMOJ.user.js
@@ -911,7 +911,8 @@ GM_registerMenuCommand("重置数据", () => {
});
//otherwise CurrentUsername might be undefined
-let logined = (document.querySelector('a').innerText == "Please logout First!");
+const firstAnchor = document.querySelector('a');
+const logined = !!firstAnchor && firstAnchor.innerText === 'Please logout First!';
if (UtilityEnabled("AutoLogin") && document.querySelector("body > a:nth-child(1)") != null && document.querySelector("body > a:nth-child(1)").innerText == "请登录后继续操作") {
if (logined) location.href = (localStorage.getItem("UserScript-LastPage") == null ? "/" : localStorage.getItem("UserScript-LastPage"));
localStorage.setItem("UserScript-LastPage", location.pathname + location.search);
From 20abaf0b35bc9544e3256aa2223b181bf854903e Mon Sep 17 00:00:00 2001
From: "github-actions[bot]"
Date: Sun, 12 Apr 2026 06:38:26 +0000
Subject: [PATCH 10/17] Update time and description of 3.4.4
---
Update.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Update.json b/Update.json
index 5b591f0b..0cd8346e 100644
--- a/Update.json
+++ b/Update.json
@@ -3554,7 +3554,7 @@
"Notes": "No release notes were provided for this release."
},
"3.4.4": {
- "UpdateDate": 1775975721817,
+ "UpdateDate": 1775975900964,
"Prerelease": true,
"UpdateContents": [
{
From 1fdc33cb0415f637692f82503320ff1f3b2e97c9 Mon Sep 17 00:00:00 2001
From: boomzero
Date: Sun, 12 Apr 2026 19:30:51 +0800
Subject: [PATCH 11/17] Revert /v1 endpoint migration while keeping version
metadata
Reverts the API route changes from #969 that added /v1/ prefixes
to all backend endpoints, while preserving the 3.4.3 version bump.
Co-Authored-By: Claude Opus 4.6
---
XMOJ.user.js | 12 ++++++------
messages.html | 4 ++--
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/XMOJ.user.js b/XMOJ.user.js
index eecedc5c..15b76f72 100644
--- a/XMOJ.user.js
+++ b/XMOJ.user.js
@@ -505,7 +505,7 @@ let RequestAPI = (Action, Data, CallBack) => {
}
GM_xmlhttpRequest({
method: "POST",
- url: (UtilityEnabled("SuperDebug") ? "http://127.0.0.1:8787/v1/" : "https://api.xmoj-bbs.me/v1/") + Action,
+ url: (UtilityEnabled("SuperDebug") ? "http://127.0.0.1:8787/" : "https://api.xmoj-bbs.me/") + Action,
headers: {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
@@ -643,7 +643,7 @@ function ConnectNotificationSocket() {
return;
}
- let wsUrl = (UtilityEnabled("SuperDebug") ? "ws://127.0.0.1:8787" : "wss://api.xmoj-bbs.me") + "/v1/ws/notifications?SessionID=" + Session;
+ let wsUrl = (UtilityEnabled("SuperDebug") ? "ws://127.0.0.1:8787" : "wss://api.xmoj-bbs.me") + "/ws/notifications?SessionID=" + Session;
if (UtilityEnabled("DebugMode")) {
console.log("WebSocket: Connecting to", wsUrl);
@@ -5021,7 +5021,7 @@ int main()
"Image": Reader.result
}, (ResponseData) => {
if (ResponseData.Success) {
- Content.value = Before + `` + After;
+ Content.value = Before + `` + After;
Content.dispatchEvent(new Event("input"));
} else {
Content.value = Before + `![上传失败!` + ResponseData.Message + `]()` + After;
@@ -5277,7 +5277,7 @@ int main()
"Image": Reader.result
}, (ResponseData) => {
if (ResponseData.Success) {
- ContentElement.value = Before + `` + After;
+ ContentElement.value = Before + `` + After;
ContentElement.dispatchEvent(new Event("input"));
} else {
ContentElement.value = Before + `![上传失败!]()` + After;
@@ -5450,7 +5450,7 @@ int main()
"Image": Reader.result
}, (ResponseData) => {
if (ResponseData.Success) {
- ContentElement.value = Before + `` + After;
+ ContentElement.value = Before + `` + After;
ContentElement.dispatchEvent(new Event("input"));
} else {
ContentElement.value = Before + `![上传失败!]()` + After;
@@ -5708,7 +5708,7 @@ int main()
"Image": Reader.result
}, (ResponseData) => {
if (ResponseData.Success) {
- ContentEditor.value = Before + `` + After;
+ ContentEditor.value = Before + `` + After;
ContentEditor.dispatchEvent(new Event("input"));
} else {
ContentEditor.value = Before + `![上传失败!]()` + After;
diff --git a/messages.html b/messages.html
index 794b2d3f..ea7e2484 100644
--- a/messages.html
+++ b/messages.html
@@ -367,8 +367,8 @@ 用户信息
'use strict';
// ── Constants ──────────────────────────────────────────────────────────────
-const API_BASE = 'https://api.xmoj-bbs.me/v1/';
-const ASSET_BASE = 'https://assets.xmoj-bbs.me/v1/GetImage?ImageID=';
+const API_BASE = 'https://api.xmoj-bbs.me/';
+const ASSET_BASE = 'https://assets.xmoj-bbs.me/GetImage?ImageID=';
const XMOJ_BASE = 'https://www.xmoj.tech';
const WEBUI_VERSION = 'webui-1.0.0';
const STORAGE_USER = 'xmoj-msg-username';
From 11180a8a619f69526a014ab00c1b5bfe6dea10c9 Mon Sep 17 00:00:00 2001
From: "github-actions[bot]"
Date: Sun, 12 Apr 2026 11:31:44 +0000
Subject: [PATCH 12/17] 3.4.4
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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": {
From 57467ea763c15a5bb9dd5cdaea71f08bf1c64578 Mon Sep 17 00:00:00 2001
From: "github-actions[bot]"
Date: Sun, 12 Apr 2026 11:31:49 +0000
Subject: [PATCH 13/17] Update version info to 3.4.4
---
Update.json | 11 +++++++++++
XMOJ.user.js | 2 +-
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/Update.json b/Update.json
index d28c065e..6b9bbafd 100644
--- a/Update.json
+++ b/Update.json
@@ -3552,6 +3552,17 @@
}
],
"Notes": "No release notes were provided for this release."
+ },
+ "3.4.4": {
+ "UpdateDate": 1775993504358,
+ "Prerelease": true,
+ "UpdateContents": [
+ {
+ "PR": 975,
+ "Description": "Revert /v1 endpoint migration"
+ }
+ ],
+ "Notes": "Revert the `/v1` endpoint migration from #969 to restore original API routes."
}
}
}
\ No newline at end of file
diff --git a/XMOJ.user.js b/XMOJ.user.js
index 15b76f72..370e74d6 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
From 522d37fa0e44d0a7ab97b162d03427a5122121e1 Mon Sep 17 00:00:00 2001
From: zsTree
Date: Sun, 12 Apr 2026 23:49:53 +0800
Subject: [PATCH 14/17] Fix loginpage.php Loop
Signed-off-by: zsTree
---
XMOJ.user.js | 28 ++++++++++++++--------------
1 file changed, 14 insertions(+), 14 deletions(-)
diff --git a/XMOJ.user.js b/XMOJ.user.js
index 1eb05d4a..57d59748 100644
--- a/XMOJ.user.js
+++ b/XMOJ.user.js
@@ -1,6 +1,6 @@
// ==UserScript==
// @name XMOJ
-// @version 3.4.4
+// @version 3.4.5
// @description XMOJ增强脚本
// @author @XMOJ-Script-dev, @langningchen and the community
// @namespace https://github/langningchen
@@ -505,7 +505,7 @@ let RequestAPI = (Action, Data, CallBack) => {
}
GM_xmlhttpRequest({
method: "POST",
- url: (UtilityEnabled("SuperDebug") ? "http://127.0.0.1:8787/v1/" : "https://api.xmoj-bbs.me/v1/") + Action,
+ url: (UtilityEnabled("SuperDebug") ? "http://127.0.0.1:8787/" : "https://api.xmoj-bbs.me/") + Action,
headers: {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
@@ -643,7 +643,7 @@ function ConnectNotificationSocket() {
return;
}
- let wsUrl = (UtilityEnabled("SuperDebug") ? "ws://127.0.0.1:8787" : "wss://api.xmoj-bbs.me") + "/v1/ws/notifications?SessionID=" + Session;
+ let wsUrl = (UtilityEnabled("SuperDebug") ? "ws://127.0.0.1:8787" : "wss://api.xmoj-bbs.me") + "/ws/notifications?SessionID=" + Session;
if (UtilityEnabled("DebugMode")) {
console.log("WebSocket: Connecting to", wsUrl);
@@ -911,18 +911,19 @@ GM_registerMenuCommand("重置数据", () => {
});
//otherwise CurrentUsername might be undefined
-const firstAnchor = document.querySelector('a');
-const logined = !!firstAnchor && firstAnchor.innerText === 'Please logout First!';
+let loginStatus;
+await fetch("https://www.xmoj.tech/loginpage.php")
+ .then((response) => response.text())
+ .then((data) => (loginStatus = data));
+const logined = loginStatus == "Please logout First!";
if (UtilityEnabled("AutoLogin") && document.querySelector("body > a:nth-child(1)") != null && document.querySelector("body > a:nth-child(1)").innerText == "请登录后继续操作") {
- if (logined) location.href = (localStorage.getItem("UserScript-LastPage") == null ? "/" : localStorage.getItem("UserScript-LastPage"));
localStorage.setItem("UserScript-LastPage", location.pathname + location.search);
location.href = "https://www.xmoj.tech/loginpage.php";
}
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 (logined) location.href = (localStorage.getItem("UserScript-LastPage") == null ? "/" : localStorage.getItem("UserScript-LastPage"));
+if (document.querySelector("#profile") === null && !logined) {
location.href = "https://www.xmoj.tech/loginpage.php";
}
let CurrentUsername = document.querySelector("#profile").innerText;
@@ -1187,8 +1188,7 @@ async function main() {
document.querySelector("body > div > div.jumbotron").className = "mt-3";
}
- if (UtilityEnabled("AutoLogin") && document.querySelector("#profile") != null && document.querySelector("#profile").innerHTML == "登录" && location.pathname != "/login.php" && location.pathname != "/loginpage.php" && location.pathname != "/lostpassword.php") {
- if (logined) location.href = (localStorage.getItem("UserScript-LastPage") == null ? "/" : localStorage.getItem("UserScript-LastPage"));
+ if (UtilityEnabled("AutoLogin") && document.querySelector("#profile") != null && document.querySelector("#profile").innerHTML == "登录" && location.pathname != "/login.php" && location.pathname != "/loginpage.php" && location.pathname != "/lostpassword.php" && !logined) {
localStorage.setItem("UserScript-LastPage", location.pathname + location.search);
location.href = "https://www.xmoj.tech/loginpage.php";
}
@@ -5026,7 +5026,7 @@ int main()
"Image": Reader.result
}, (ResponseData) => {
if (ResponseData.Success) {
- Content.value = Before + `` + After;
+ Content.value = Before + `` + After;
Content.dispatchEvent(new Event("input"));
} else {
Content.value = Before + `![上传失败!` + ResponseData.Message + `]()` + After;
@@ -5282,7 +5282,7 @@ int main()
"Image": Reader.result
}, (ResponseData) => {
if (ResponseData.Success) {
- ContentElement.value = Before + `` + After;
+ ContentElement.value = Before + `` + After;
ContentElement.dispatchEvent(new Event("input"));
} else {
ContentElement.value = Before + `![上传失败!]()` + After;
@@ -5455,7 +5455,7 @@ int main()
"Image": Reader.result
}, (ResponseData) => {
if (ResponseData.Success) {
- ContentElement.value = Before + `` + After;
+ ContentElement.value = Before + `` + After;
ContentElement.dispatchEvent(new Event("input"));
} else {
ContentElement.value = Before + `![上传失败!]()` + After;
@@ -5713,7 +5713,7 @@ int main()
"Image": Reader.result
}, (ResponseData) => {
if (ResponseData.Success) {
- ContentEditor.value = Before + `` + After;
+ ContentEditor.value = Before + `` + After;
ContentEditor.dispatchEvent(new Event("input"));
} else {
ContentEditor.value = Before + `![上传失败!]()` + After;
From 2415c7f9b8d6fac56535d3397f314b9631075866 Mon Sep 17 00:00:00 2001
From: zsTree
Date: Sun, 12 Apr 2026 23:50:21 +0800
Subject: [PATCH 15/17] Bump version from 3.4.4 to 3.4.5
Signed-off-by: zsTree
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index c433e40d..e2238633 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "xmoj-script",
- "version": "3.4.4",
+ "version": "3.4.5",
"description": "an improvement script for xmoj.tech",
"main": "AddonScript.js",
"scripts": {
From b5397c66192d365df09e68981606429171a15946 Mon Sep 17 00:00:00 2001
From: "github-actions[bot]"
Date: Sun, 12 Apr 2026 15:52:34 +0000
Subject: [PATCH 16/17] Update time and description of 3.4.5
---
Update.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Update.json b/Update.json
index d1b3061f..4248829d 100644
--- a/Update.json
+++ b/Update.json
@@ -3565,7 +3565,7 @@
"Notes": "Revert the `/v1` endpoint migration from #969 to restore original API routes."
},
"3.4.5": {
- "UpdateDate": 1775975900964,
+ "UpdateDate": 1776009148847,
"Prerelease": true,
"UpdateContents": [
{
From e23fdd65fab82ee4488e5541d515e5b0106bd3ce Mon Sep 17 00:00:00 2001
From: "github-actions[bot]"
Date: Sun, 12 Apr 2026 15:57:19 +0000
Subject: [PATCH 17/17] Update time and description of 3.4.5
---
Update.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Update.json b/Update.json
index 4248829d..03af9550 100644
--- a/Update.json
+++ b/Update.json
@@ -3565,7 +3565,7 @@
"Notes": "Revert the `/v1` endpoint migration from #969 to restore original API routes."
},
"3.4.5": {
- "UpdateDate": 1776009148847,
+ "UpdateDate": 1776009434318,
"Prerelease": true,
"UpdateContents": [
{