From e509bb55f1b850a00c8776162803cfc33465166c Mon Sep 17 00:00:00 2001 From: def-WA2025 Date: Sun, 15 Mar 2026 17:27:48 +0800 Subject: [PATCH 1/2] Remove Problem Translate Button --- XMOJ.user.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/XMOJ.user.js b/XMOJ.user.js index d8c8c077..f4cc6e6e 100644 --- a/XMOJ.user.js +++ b/XMOJ.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name XMOJ -// @version 3.3.4 +// @version 3.3.5 // @description XMOJ增强脚本 // @author @XMOJ-Script-dev, @langningchen and the community // @namespace https://github/langningchen @@ -2277,6 +2277,11 @@ async function main() { localStorage.setItem("UserScript-Problem-" + Temp[i].children[1].innerText + "-Name", Temp[i].children[2].innerText); } } else if (location.pathname == "/problem.php") { + let transZhEn = document.getElementById("lang_cn_to_en"); + let transEnZh = document.getElementById("lang_en_to_cn"); + if (transZhEn !== null) await transZhEn.remove(); + if (transEnZh !== null) await transEnZh.remove(); + await RenderMathJax(); if (SearchParams.get("cid") != null && UtilityEnabled("ProblemSwitcher")) { let pid = localStorage.getItem("UserScript-Contest-" + SearchParams.get("cid") + "-Problem-" + SearchParams.get("pid") + "-PID"); From 2d0c2262fb46b254acf9bc20f81c8474fef54dae Mon Sep 17 00:00:00 2001 From: def-WA2025 Date: Sun, 15 Mar 2026 17:37:25 +0800 Subject: [PATCH 2/2] Remove Problem Translate Button --- XMOJ.user.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/XMOJ.user.js b/XMOJ.user.js index f4cc6e6e..275ef481 100644 --- a/XMOJ.user.js +++ b/XMOJ.user.js @@ -2279,8 +2279,8 @@ async function main() { } else if (location.pathname == "/problem.php") { let transZhEn = document.getElementById("lang_cn_to_en"); let transEnZh = document.getElementById("lang_en_to_cn"); - if (transZhEn !== null) await transZhEn.remove(); - if (transEnZh !== null) await transEnZh.remove(); + if (transZhEn !== null) transZhEn.remove(); + if (transEnZh !== null) transEnZh.remove(); await RenderMathJax(); if (SearchParams.get("cid") != null && UtilityEnabled("ProblemSwitcher")) {