From 7781bd79faddc8c8a1b90cb0b6845d7134011cba Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Sat, 2 May 2026 07:39:22 +0000
Subject: [PATCH 01/12] switch endpoint to api.xmoj-script.uk for everything
Agent-Logs-Url: https://github.com/XMOJ-Script-dev/XMOJ-Script/sessions/3a87c529-2f63-4617-8be5-5b9f3c33f751
Co-authored-by: PythonSmall-Q <106425289+PythonSmall-Q@users.noreply.github.com>
---
XMOJ.user.js | 15 +++++++--------
messages.html | 4 ++--
2 files changed, 9 insertions(+), 10 deletions(-)
diff --git a/XMOJ.user.js b/XMOJ.user.js
index 57d59748..46ff1eaf 100644
--- a/XMOJ.user.js
+++ b/XMOJ.user.js
@@ -23,8 +23,7 @@
// @grant GM_cookie
// @homepage https://www.xmoj-bbs.me/
// @supportURL https://support.xmoj-bbs.me/form/8050213e-c806-4680-b414-0d1c48263677
-// @connect api.xmoj-bbs.tech
-// @connect api.xmoj-bbs.me
+// @connect api.xmoj-script.uk
// @connect challenges.cloudflare.com
// @connect cppinsights.io
// @connect cdnjs.cloudflare.com
@@ -505,7 +504,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/" : "https://api.xmoj-script.uk/") + Action,
headers: {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
@@ -643,7 +642,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-script.uk") + "/ws/notifications?SessionID=" + Session;
if (UtilityEnabled("DebugMode")) {
console.log("WebSocket: Connecting to", wsUrl);
@@ -5026,7 +5025,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 +5281,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 +5454,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 +5712,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 06b43e2e..65aac3ba 100644
--- a/messages.html
+++ b/messages.html
@@ -386,8 +386,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-script.uk/';
+const ASSET_BASE = 'https://api.xmoj-script.uk/GetImage?ImageID=';
const XMOJ_BASE = 'https://www.xmoj.tech';
const WEBUI_VERSION = 'webui-1.0.0';
const STORAGE_USER = 'xmoj-msg-username';
From 0788601178ace016cb7a91e808602f166d8cac02 Mon Sep 17 00:00:00 2001
From: Shan Wenxiao
Date: Sat, 2 May 2026 15:41:00 +0800
Subject: [PATCH 02/12] Update ASSET_BASE URL to use assets subdomain
Signed-off-by: Shan Wenxiao
---
messages.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/messages.html b/messages.html
index 65aac3ba..224bddca 100644
--- a/messages.html
+++ b/messages.html
@@ -387,7 +387,7 @@ 用户信息
// ── Constants ──────────────────────────────────────────────────────────────
const API_BASE = 'https://api.xmoj-script.uk/';
-const ASSET_BASE = 'https://api.xmoj-script.uk/GetImage?ImageID=';
+const ASSET_BASE = 'https://assets.xmoj-script.uk/GetImage?ImageID=';
const XMOJ_BASE = 'https://www.xmoj.tech';
const WEBUI_VERSION = 'webui-1.0.0';
const STORAGE_USER = 'xmoj-msg-username';
From 78108dfe1c1e17ed10d784b1d1f20f7f7503badd Mon Sep 17 00:00:00 2001
From: "github-actions[bot]"
Date: Sat, 2 May 2026 07:41:20 +0000
Subject: [PATCH 03/12] 3.4.6
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index e2238633..a2e6b736 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "xmoj-script",
- "version": "3.4.5",
+ "version": "3.4.6",
"description": "an improvement script for xmoj.tech",
"main": "AddonScript.js",
"scripts": {
From be7c5170c85edfb179844dab650e4444c32a6cb2 Mon Sep 17 00:00:00 2001
From: "github-actions[bot]"
Date: Sat, 2 May 2026 07:41:27 +0000
Subject: [PATCH 04/12] Update version info to 3.4.6
---
Update.json | 11 +++++++++++
XMOJ.user.js | 2 +-
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/Update.json b/Update.json
index 03af9550..4b435495 100644
--- a/Update.json
+++ b/Update.json
@@ -3574,6 +3574,17 @@
}
],
"Notes": "Fix loginpage.php loop."
+ },
+ "3.4.6": {
+ "UpdateDate": 1777707681316,
+ "Prerelease": true,
+ "UpdateContents": [
+ {
+ "PR": 980,
+ "Description": "Switch all backend endpoints to api.xmoj-script.uk"
+ }
+ ],
+ "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 46ff1eaf..4dffff46 100644
--- a/XMOJ.user.js
+++ b/XMOJ.user.js
@@ -1,6 +1,6 @@
// ==UserScript==
// @name XMOJ
-// @version 3.4.5
+// @version 3.4.6
// @description XMOJ增强脚本
// @author @XMOJ-Script-dev, @langningchen and the community
// @namespace https://github/langningchen
From 2c8981a3181de8e9fc105c795a917635eaa58e82 Mon Sep 17 00:00:00 2001
From: Shan Wenxiao
Date: Sat, 2 May 2026 15:45:09 +0800
Subject: [PATCH 05/12] Update image upload URLs to new asset location
Signed-off-by: Shan Wenxiao
---
XMOJ.user.js | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/XMOJ.user.js b/XMOJ.user.js
index 4dffff46..63cd3190 100644
--- a/XMOJ.user.js
+++ b/XMOJ.user.js
@@ -21,8 +21,10 @@
// @grant GM_setValue
// @grant GM_getValue
// @grant GM_cookie
-// @homepage https://www.xmoj-bbs.me/
-// @supportURL https://support.xmoj-bbs.me/form/8050213e-c806-4680-b414-0d1c48263677
+// @homepage https://www.xmoj-script.uk/
+// @supportURL https://github.com/XMOJ-Script-dev/XMOJ-Script/issues
+// @connect api.xmoj-bbs.tech
+// @connect api.xmoj-bbs.me
// @connect api.xmoj-script.uk
// @connect challenges.cloudflare.com
// @connect cppinsights.io
@@ -5025,7 +5027,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;
@@ -5281,7 +5283,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;
@@ -5454,7 +5456,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;
@@ -5712,7 +5714,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 51f6bb2665d5968ff18b1dd277db908a842ba551 Mon Sep 17 00:00:00 2001
From: "github-actions[bot]"
Date: Sat, 2 May 2026 07:45:32 +0000
Subject: [PATCH 06/12] Update time and description of 3.4.6
---
Update.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Update.json b/Update.json
index 4b435495..a1ad88b8 100644
--- a/Update.json
+++ b/Update.json
@@ -3576,7 +3576,7 @@
"Notes": "Fix loginpage.php loop."
},
"3.4.6": {
- "UpdateDate": 1777707681316,
+ "UpdateDate": 1777707927028,
"Prerelease": true,
"UpdateContents": [
{
From 4cf26783fc1feac33c791ea06b357e3efd74ae32 Mon Sep 17 00:00:00 2001
From: Shan Wenxiao
Date: Sat, 2 May 2026 15:46:54 +0800
Subject: [PATCH 07/12] Update ServerURL for script debugging
Signed-off-by: Shan Wenxiao
---
XMOJ.user.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/XMOJ.user.js b/XMOJ.user.js
index 63cd3190..e9d5874f 100644
--- a/XMOJ.user.js
+++ b/XMOJ.user.js
@@ -923,7 +923,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")
+let ServerURL = (UtilityEnabled("DebugMode") ? "https://ghpages.xmoj-script.uk/" : "https://www.xmoj-script.uk")
if (document.querySelector("#profile") === null && !logined) {
location.href = "https://www.xmoj.tech/loginpage.php";
}
From be6ce3e77f8f0f4ccbf93f6046c17ddcfdcbc4e3 Mon Sep 17 00:00:00 2001
From: "github-actions[bot]"
Date: Sat, 2 May 2026 07:47:24 +0000
Subject: [PATCH 08/12] Update time and description of 3.4.6
---
Update.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Update.json b/Update.json
index a1ad88b8..dcb5d430 100644
--- a/Update.json
+++ b/Update.json
@@ -3576,7 +3576,7 @@
"Notes": "Fix loginpage.php loop."
},
"3.4.6": {
- "UpdateDate": 1777707927028,
+ "UpdateDate": 1777708038758,
"Prerelease": true,
"UpdateContents": [
{
From 510db556a5c5b6958571a547c7915de8bda627d2 Mon Sep 17 00:00:00 2001
From: Shan Wenxiao
Date: Sat, 2 May 2026 15:49:18 +0800
Subject: [PATCH 09/12] Update SSO button for development version
Signed-off-by: Shan Wenxiao
---
messages.html | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/messages.html b/messages.html
index 224bddca..f8a8ef86 100644
--- a/messages.html
+++ b/messages.html
@@ -74,7 +74,7 @@ 登录
-
+
@@ -991,7 +991,6 @@ 用户信息
scope: OAUTH_SCOPE,
state: state
});
- location.href = OAUTH_AUTHORIZE_URL + '?' + params.toString();
}
async function exchangeSsoCode(code, state) {
From 240b305da020f0e4e269286ca28195effa070ce2 Mon Sep 17 00:00:00 2001
From: "github-actions[bot]"
Date: Sat, 2 May 2026 07:49:43 +0000
Subject: [PATCH 10/12] Update time and description of 3.4.6
---
Update.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Update.json b/Update.json
index dcb5d430..ca9fb7a1 100644
--- a/Update.json
+++ b/Update.json
@@ -3576,7 +3576,7 @@
"Notes": "Fix loginpage.php loop."
},
"3.4.6": {
- "UpdateDate": 1777708038758,
+ "UpdateDate": 1777708177251,
"Prerelease": true,
"UpdateContents": [
{
From 598442a49b2e80270bc089b31eb4ab57a752781f Mon Sep 17 00:00:00 2001
From: Shan Wenxiao
Date: Sat, 2 May 2026 15:53:19 +0800
Subject: [PATCH 11/12] Remove badge from messages link in navigation
Signed-off-by: Shan Wenxiao
---
index.html | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/index.html b/index.html
index 831cf471..fda3f205 100644
--- a/index.html
+++ b/index.html
@@ -48,9 +48,7 @@
关于
- 短消息在线看
- Alpha
-
+ 短消息在线看
ELXMOJ 客户端
From e09ddc39ef1bcc95603c320e50dde6a2e56945fb Mon Sep 17 00:00:00 2001
From: "github-actions[bot]"
Date: Sat, 2 May 2026 07:53:47 +0000
Subject: [PATCH 12/12] Update time and description of 3.4.6
---
Update.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Update.json b/Update.json
index ca9fb7a1..e5371722 100644
--- a/Update.json
+++ b/Update.json
@@ -3576,7 +3576,7 @@
"Notes": "Fix loginpage.php loop."
},
"3.4.6": {
- "UpdateDate": 1777708177251,
+ "UpdateDate": 1777708421566,
"Prerelease": true,
"UpdateContents": [
{