diff --git a/Update.json b/Update.json index 65325b1f..63669aa3 100644 --- a/Update.json +++ b/Update.json @@ -3444,6 +3444,17 @@ } ], "Notes": "Fix ProblemSwitcher Not Update" + }, + "3.3.3": { + "UpdateDate": 1773550684270, + "Prerelease": true, + "UpdateContents": [ + { + "PR": 937, + "Description": "Display status.php Query Content" + } + ], + "Notes": "Display status.php query content." } } } \ No newline at end of file diff --git a/XMOJ.user.js b/XMOJ.user.js index 897238fe..3cddb42c 100644 --- a/XMOJ.user.js +++ b/XMOJ.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name XMOJ -// @version 3.3.2 +// @version 3.3.3 // @description XMOJ增强脚本 // @author @XMOJ-Script-dev, @langningchen and the community // @namespace https://github/langningchen @@ -2526,6 +2526,20 @@ async function main() { document.title = "提交状态"; document.querySelector("body > script:nth-child(5)").remove(); if (UtilityEnabled("NewBootstrap")) { + var checkNum = function(str) { + var patrn = /^[0-9]{1,20}$/; + var ans = true; + if (!patrn.exec(str)) ans = false; + return ans; + } + + const params = new URL(location.href).searchParams; + let CurrentProblemId = checkNum(params.get("problem_id")) ? Number(params.get("problem_id")) : ""; + let CurrentLanguageParam = params.get("language"); + let CurrentLanguage = checkNum(CurrentLanguageParam) && -1 <= CurrentLanguageParam && CurrentLanguageParam <= 2 ? Number(CurrentLanguageParam) : "-1"; + let CurrentJresultParam = params.get("jresult"); + let CurrentJresult = checkNum(CurrentJresultParam) && -1 <= CurrentJresultParam && CurrentJresultParam <= 11 ? Number(CurrentJresultParam) : "-1"; + document.querySelector("#simform").outerHTML = `