From 4d9849e670fd4020e1b607121a8a4485673a4583 Mon Sep 17 00:00:00 2001 From: Zhu Chenrui Date: Wed, 31 Jan 2024 13:57:41 +0800 Subject: [PATCH] fix #409 (#413) * fix #409 (@langningchen do it this way...) * 1.1.36 * Update version info to 1.1.36 --------- Co-authored-by: github-actions[bot] --- .idea/workspace.xml | 5 ++--- Update.json | 11 +++++++++++ XMOJ.user.js | 9 ++++++--- package.json | 2 +- 4 files changed, 20 insertions(+), 7 deletions(-) diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 71e87d1a..20735174 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -6,7 +6,6 @@ - - + \ No newline at end of file diff --git a/Update.json b/Update.json index 4d942410..163fea48 100644 --- a/Update.json +++ b/Update.json @@ -1183,6 +1183,17 @@ } ], "Notes": "No release notes were provided for this release." + }, + "1.1.36": { + "UpdateDate": 1706680652574, + "Prerelease": true, + "UpdateContents": [ + { + "PR": 413, + "Description": "fix #409" + } + ], + "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 b6238b83..63952079 100644 --- a/XMOJ.user.js +++ b/XMOJ.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name XMOJ -// @version 1.1.35 +// @version 1.1.36 // @description XMOJ增强脚本 // @author @XMOJ-Script-dev, @langningchen and the community // @namespace https://github/langningchen @@ -546,8 +546,11 @@ if (location.host != "www.xmoj.tech") { await Promise.all(promises); }; - - loadResources(); + if (location.pathname == "/submitpage.php") { + await loadResources(); + } else { + loadResources(); + } document.querySelector("nav").className = "navbar navbar-expand-lg bg-body-tertiary"; document.querySelector("#navbar > ul:nth-child(1)").classList = "navbar-nav me-auto mb-2 mb-lg-0"; document.querySelector("body > div > nav > div > div.navbar-header").outerHTML = `${UtilityEnabled("ReplaceXM") ? "高老师" : "小明"}的OJ`; diff --git a/package.json b/package.json index c54d03d4..50422c8c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xmoj-script", - "version": "1.1.35", + "version": "1.1.36", "description": "an improvement script for xmoj.tech", "main": "AddonScript.js", "scripts": {