diff --git a/Update.json b/Update.json index 13f16985..6fbb2c7b 100644 --- a/Update.json +++ b/Update.json @@ -2681,6 +2681,43 @@ } ], "Notes": "No release notes were provided for this release." + }, + "1.2.74": { + "UpdateDate": 1738933722742, + "Prerelease": true, + "UpdateContents": [ + { + "PR": 762, + "Description": "讨论回复跳转优化" + } + ], + "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." + }, + "1.3.0": { + "UpdateDate": 1738976786495, + "Prerelease": false, + "UpdateContents": [ + { + "PR": 762, + "Description": "讨论回复跳转优化" + }, + { + "PR": 767, + "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." } } } \ No newline at end of file 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); } diff --git a/XMOJ.user.js b/XMOJ.user.js index b1be1f7a..5e0378a5 100644 --- a/XMOJ.user.js +++ b/XMOJ.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name XMOJ -// @version 1.2.73 +// @version 1.3.0 // @description XMOJ增强脚本 // @author @XMOJ-Script-dev, @langningchen and the community // @namespace https://github/langningchen @@ -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].PageNumber, "_blank"); RequestAPI("ReadBBSMention", { "MentionID": Number(MentionList[i].MentionID) }, () => { @@ -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); diff --git a/package.json b/package.json index a150a192..f9481ffd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xmoj-script", - "version": "1.2.73", + "version": "1.3.0", "description": "an improvement script for xmoj.tech", "main": "AddonScript.js", "scripts": {