From ca1538ef4440c8cfae1c0c7dfbc38f0d896f81f4 Mon Sep 17 00:00:00 2001 From: boomzero Date: Fri, 7 Feb 2025 20:59:08 +0800 Subject: [PATCH 01/20] fixes #43 --- XMOJ.user.js | 2 +- robots.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/XMOJ.user.js b/XMOJ.user.js index b1be1f7a..11b943d5 100644 --- a/XMOJ.user.js +++ b/XMOJ.user.js @@ -1199,7 +1199,7 @@ async function main() { ToastViewButton.classList.add("btn", "btn-primary", "btn-sm"); ToastViewButton.innerText = "查看"; ToastViewButton.addEventListener("click", () => { - open("https://www.xmoj.tech/discuss3/thread.php?tid=" + MentionList[i].PostID, "_blank"); + open("https://www.xmoj.tech/discuss3/thread.php?tid=" + MentionList[i].PostID + '&page=' + MentionList[i].PageCount, "_blank"); RequestAPI("ReadBBSMention", { "MentionID": Number(MentionList[i].MentionID) }, () => { diff --git a/robots.txt b/robots.txt index 1ec21142..09c37fed 100644 --- a/robots.txt +++ b/robots.txt @@ -1,2 +1,2 @@ user-agent: * -allow: * +allow: / From 2cab14cd3f2986f33206d5d2f5ecf1c9a8c60265 Mon Sep 17 00:00:00 2001 From: boomzero Date: Fri, 7 Feb 2025 21:01:37 +0800 Subject: [PATCH 02/20] ??? --- robots.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/robots.txt b/robots.txt index 09c37fed..1ec21142 100644 --- a/robots.txt +++ b/robots.txt @@ -1,2 +1,2 @@ user-agent: * -allow: / +allow: * From c2ada3c210c8c9351b898fa9bd50a13620287d53 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 7 Feb 2025 13:01:53 +0000 Subject: [PATCH 03/20] 1.2.74 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a150a192..197e555e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xmoj-script", - "version": "1.2.73", + "version": "1.2.74", "description": "an improvement script for xmoj.tech", "main": "AddonScript.js", "scripts": { From f021a58bdbc46c8d2f424a4d4ad4c6cb85503892 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 7 Feb 2025 13:01:54 +0000 Subject: [PATCH 04/20] Update version info to 1.2.74 --- Update.json | 11 +++++++++++ XMOJ.user.js | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/Update.json b/Update.json index 13f16985..2a169ba5 100644 --- a/Update.json +++ b/Update.json @@ -2681,6 +2681,17 @@ } ], "Notes": "No release notes were provided for this release." + }, + "1.2.74": { + "UpdateDate": 1738933313558, + "Prerelease": true, + "UpdateContents": [ + { + "PR": 762, + "Description": " 讨论回复跳转优化" + } + ], + "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 11b943d5..17f227b7 100644 --- a/XMOJ.user.js +++ b/XMOJ.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name XMOJ -// @version 1.2.73 +// @version 1.2.74 // @description XMOJ增强脚本 // @author @XMOJ-Script-dev, @langningchen and the community // @namespace https://github/langningchen From f793dff41ecc0a78490c92c055ccf6a8291c27a1 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 7 Feb 2025 13:02:02 +0000 Subject: [PATCH 05/20] Update time and description of 1.2.74 --- Update.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Update.json b/Update.json index 2a169ba5..01a22317 100644 --- a/Update.json +++ b/Update.json @@ -2683,7 +2683,7 @@ "Notes": "No release notes were provided for this release." }, "1.2.74": { - "UpdateDate": 1738933313558, + "UpdateDate": 1738933321191, "Prerelease": true, "UpdateContents": [ { From f7cad3ac414d7712e77fc778c979bbe11fcf78f3 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 7 Feb 2025 13:02:38 +0000 Subject: [PATCH 06/20] Update time and description of 1.2.74 --- Update.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Update.json b/Update.json index 01a22317..5faf1755 100644 --- a/Update.json +++ b/Update.json @@ -2683,7 +2683,7 @@ "Notes": "No release notes were provided for this release." }, "1.2.74": { - "UpdateDate": 1738933321191, + "UpdateDate": 1738933358357, "Prerelease": true, "UpdateContents": [ { From 4b68d52a0f50bdcac35fcfa1d96c3f67b276032e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 7 Feb 2025 13:02:53 +0000 Subject: [PATCH 07/20] Update time and description of 1.2.74 --- Update.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Update.json b/Update.json index 5faf1755..7b4ed9e0 100644 --- a/Update.json +++ b/Update.json @@ -2683,12 +2683,12 @@ "Notes": "No release notes were provided for this release." }, "1.2.74": { - "UpdateDate": 1738933358357, + "UpdateDate": 1738933372979, "Prerelease": true, "UpdateContents": [ { "PR": 762, - "Description": " 讨论回复跳转优化" + "Description": "讨论回复跳转优化" } ], "Notes": "No release notes were provided for this release." From f27e05b2a488a8d70443ac1728b2a1108dfb6a3b Mon Sep 17 00:00:00 2001 From: boomzero Date: Fri, 7 Feb 2025 21:05:51 +0800 Subject: [PATCH 08/20] oops --- XMOJ.user.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/XMOJ.user.js b/XMOJ.user.js index 17f227b7..4f4fef23 100644 --- a/XMOJ.user.js +++ b/XMOJ.user.js @@ -1199,7 +1199,7 @@ async function main() { ToastViewButton.classList.add("btn", "btn-primary", "btn-sm"); ToastViewButton.innerText = "查看"; ToastViewButton.addEventListener("click", () => { - open("https://www.xmoj.tech/discuss3/thread.php?tid=" + MentionList[i].PostID + '&page=' + MentionList[i].PageCount, "_blank"); + open("https://www.xmoj.tech/discuss3/thread.php?tid=" + MentionList[i].PostID + '&page=' + MentionList[i].PageNumber, "_blank"); RequestAPI("ReadBBSMention", { "MentionID": Number(MentionList[i].MentionID) }, () => { From 4cd067f97e772a138906a00c17e4e5c8f14c1953 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 7 Feb 2025 13:06:42 +0000 Subject: [PATCH 09/20] Update time and description of 1.2.74 --- Update.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Update.json b/Update.json index 7b4ed9e0..7a82b550 100644 --- a/Update.json +++ b/Update.json @@ -2683,7 +2683,7 @@ "Notes": "No release notes were provided for this release." }, "1.2.74": { - "UpdateDate": 1738933372979, + "UpdateDate": 1738933601521, "Prerelease": true, "UpdateContents": [ { From c57d0587c8f70c52d54e79b199379953758c1db5 Mon Sep 17 00:00:00 2001 From: boomzero Date: Fri, 7 Feb 2025 21:07:56 +0800 Subject: [PATCH 10/20] rel notes --- Update.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Update.json b/Update.json index 7a82b550..0c9fa9c5 100644 --- a/Update.json +++ b/Update.json @@ -2691,7 +2691,7 @@ "Description": "讨论回复跳转优化" } ], - "Notes": "No release notes were provided for this release." + "Notes": "This was so hard......" } } } \ No newline at end of file From 5b3bbd3448c85095042c50f3491b8a0141e16fc1 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 7 Feb 2025 13:08:43 +0000 Subject: [PATCH 11/20] Update time and description of 1.2.74 --- Update.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Update.json b/Update.json index 0c9fa9c5..6f38f3e8 100644 --- a/Update.json +++ b/Update.json @@ -2683,7 +2683,7 @@ "Notes": "No release notes were provided for this release." }, "1.2.74": { - "UpdateDate": 1738933601521, + "UpdateDate": 1738933722742, "Prerelease": true, "UpdateContents": [ { From 5bb044329436878f7d4f11d01ee3c858296f17a2 Mon Sep 17 00:00:00 2001 From: boomzero Date: Sat, 8 Feb 2025 08:26:48 +0800 Subject: [PATCH 12/20] fix #123 12345678910111213 --- XMOJ.user.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/XMOJ.user.js b/XMOJ.user.js index 4f4fef23..3d0cff44 100644 --- a/XMOJ.user.js +++ b/XMOJ.user.js @@ -4847,7 +4847,7 @@ int main() Delete.style.display = ""; } } - PostTitle.innerText = ResponseData.Data.Title + (ResponseData.Data.ProblemID == 0 ? "" : ` - 题目` + ResponseData.Data.ProblemID); + PostTitle.innerHTML = ResponseData.Data.Title + (ResponseData.Data.ProblemID == 0 ? "" : ` - 题目` + ` ` + ResponseData.Data.ProblemID + ``); document.title = "讨论" + ThreadID + ": " + ResponseData.Data.Title; PostAuthor.innerHTML = ""; GetUsernameHTML(PostAuthor.children[0], ResponseData.Data.UserID); From d76dcf2f12391a5ade9783e1446b720556536758 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 8 Feb 2025 00:28:45 +0000 Subject: [PATCH 13/20] 1.2.75 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 197e555e..63778581 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xmoj-script", - "version": "1.2.74", + "version": "1.2.75", "description": "an improvement script for xmoj.tech", "main": "AddonScript.js", "scripts": { From 7d94c786d2805ca313bb8f06c9ffdb520cdcdf16 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 8 Feb 2025 00:28:46 +0000 Subject: [PATCH 14/20] Update version info to 1.2.75 --- Update.json | 11 +++++++++++ XMOJ.user.js | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/Update.json b/Update.json index 6f38f3e8..1e4fe654 100644 --- a/Update.json +++ b/Update.json @@ -2692,6 +2692,17 @@ } ], "Notes": "This was so hard......" + }, + "1.2.75": { + "UpdateDate": 1738974525711, + "Prerelease": true, + "UpdateContents": [ + { + "PR": 767, + "Description": "进入讨论后给出题目的链接 " + } + ], + "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 3d0cff44..28ac1222 100644 --- a/XMOJ.user.js +++ b/XMOJ.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name XMOJ -// @version 1.2.74 +// @version 1.2.75 // @description XMOJ增强脚本 // @author @XMOJ-Script-dev, @langningchen and the community // @namespace https://github/langningchen From 5485878e6f511f954d50523442198ee5c712decc Mon Sep 17 00:00:00 2001 From: boomzero Date: Sat, 8 Feb 2025 08:41:42 +0800 Subject: [PATCH 15/20] long overdue --- Update/UpdateVersion.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Update/UpdateVersion.js b/Update/UpdateVersion.js index 1992a556..1fab8e5e 100644 --- a/Update/UpdateVersion.js +++ b/Update/UpdateVersion.js @@ -14,6 +14,12 @@ var JSFileContent = readFileSync(JSFileName, "utf8"); execSync("git config --global user.email \"github-actions[bot]@users.noreply.github.com\""); execSync("git config --global user.name \"github-actions[bot]\""); if (JSONFileContent.includes('//!ci-no-touch')) { + var updatedContent = JSONFileContent.replace('//!ci-no-touch', ''); + writeFileSync(JSONFileName, updatedContent, "utf8"); + execSync("git config pull.rebase false"); + execSync("git pull"); + execSync("git commit -a -m \"remove //!ci-no-touch\""); + execSync("git push -f"); console.log('I won\'t touch this. Exiting process.'); process.exit(0); } From 17c711b054161f842a528c869904b2ce63838d40 Mon Sep 17 00:00:00 2001 From: boomzero Date: Sat, 8 Feb 2025 08:44:36 +0800 Subject: [PATCH 16/20] change the versioning strategy --- Update/UpdateToRelease.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Update/UpdateToRelease.js b/Update/UpdateToRelease.js index 8e651fe3..37256782 100644 --- a/Update/UpdateToRelease.js +++ b/Update/UpdateToRelease.js @@ -58,7 +58,7 @@ if (LastType == "Release") { if (LastJSVersion != NpmVersion) { console.warn("Assuming you manually ran npm version."); } else { - execSync("npm version patch"); + execSync("npm version minor"); } var CurrentVersion = execSync("jq -r '.version' package.json").toString().trim(); console.log("Current version : " + CurrentVersion); From 47021ea812913b84c373e06ee44898ee2b0f106a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 8 Feb 2025 01:06:26 +0000 Subject: [PATCH 17/20] 1.3.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 63778581..f9481ffd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xmoj-script", - "version": "1.2.75", + "version": "1.3.0", "description": "an improvement script for xmoj.tech", "main": "AddonScript.js", "scripts": { From 66246072234a28ba69f90799586b9f691d176dfa Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 8 Feb 2025 01:06:27 +0000 Subject: [PATCH 18/20] Update to release 1.3.0 --- Update.json | 15 +++++++++++++++ XMOJ.user.js | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/Update.json b/Update.json index 1e4fe654..3d59e8fc 100644 --- a/Update.json +++ b/Update.json @@ -2703,6 +2703,21 @@ } ], "Notes": "No release notes were provided for this release." + }, + "1.3.0": { + "UpdateDate": 1738976786495, + "Prerelease": false, + "UpdateContents": [ + { + "PR": 762, + "Description": "讨论回复跳转优化" + }, + { + "PR": 767, + "Description": "进入讨论后给出题目的链接 " + } + ], + "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 28ac1222..5e0378a5 100644 --- a/XMOJ.user.js +++ b/XMOJ.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name XMOJ -// @version 1.2.75 +// @version 1.3.0 // @description XMOJ增强脚本 // @author @XMOJ-Script-dev, @langningchen and the community // @namespace https://github/langningchen From 7f9911510117253be275508fa3d1597b37761c12 Mon Sep 17 00:00:00 2001 From: boomzero Date: Sat, 8 Feb 2025 09:13:26 +0800 Subject: [PATCH 19/20] rel notes --- Update.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Update.json b/Update.json index 3d59e8fc..05ebb9be 100644 --- a/Update.json +++ b/Update.json @@ -2717,7 +2717,7 @@ "Description": "进入讨论后给出题目的链接 " } ], - "Notes": "No release notes were provided for this release." + "Notes": "If you are curious why the version number is v1.3.0, it's because we changed our versioning strategy! Click here for more details."//!ci-no-touch } } } \ No newline at end of file From 654801c350bb3f3773a7dce7d5289debae35267e Mon Sep 17 00:00:00 2001 From: boomzero Date: Sat, 8 Feb 2025 09:15:23 +0800 Subject: [PATCH 20/20] emm... --- Update.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Update.json b/Update.json index 05ebb9be..6fbb2c7b 100644 --- a/Update.json +++ b/Update.json @@ -2717,7 +2717,7 @@ "Description": "进入讨论后给出题目的链接 " } ], - "Notes": "If you are curious why the version number is v1.3.0, it's because we changed our versioning strategy! Click here for more details."//!ci-no-touch + "Notes": "If you are curious why the version number is v1.3.0, it's because we changed our versioning strategy! Click here for more details." } } } \ No newline at end of file