From 2f80e4fedfd1bbdfba0b35a1f01d145c29792683 Mon Sep 17 00:00:00 2001 From: Zhu Chenrui <85378277+boomzero@users.noreply.github.com> Date: Fri, 25 Aug 2023 07:45:49 +0800 Subject: [PATCH] =?UTF-8?q?#73=20=E5=88=A0=E9=99=A4=E5=A4=8D=E5=88=B6?= =?UTF-8?q?=E8=A6=81=E6=95=B0=E6=8D=AE=E8=AF=AD=E5=8F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- XMOJ.user.js | 61 ---------------------------------------------------- 1 file changed, 61 deletions(-) diff --git a/XMOJ.user.js b/XMOJ.user.js index 46ba85a9..b8a67def 100644 --- a/XMOJ.user.js +++ b/XMOJ.user.js @@ -2438,67 +2438,6 @@ else { if (document.querySelector("#results > div") == undefined) { document.querySelector("#results").parentElement.innerHTML = "没有测试点信息"; } - else { - for (let i = 0; i < document.querySelector("#results > div").children.length; i++) { - let CurrentElement = document.querySelector("#results > div").children[i].children[0].children[0].children[0]; - let Temp = CurrentElement.innerText.substring(0, CurrentElement.innerText.length - 2).split("/"); - CurrentElement.innerText = TimeToStringTime(Temp[0]) + "/" + SizeToStringSize(Temp[1]); - CurrentElement = CurrentElement.parentNode.parentNode; - let CopyButton = document.createElement("div"); CurrentElement.appendChild(CopyButton); - CopyButton.style.display = "none"; - CopyButton.style.position = "absolute"; - CopyButton.style.fontSize = "12px"; - CopyButton.style.margin = "6px"; - CopyButton.innerText = "点此复制获取数据的语句"; - CurrentElement.addEventListener("mouseover", () => { - let Temp = CurrentElement.children; - for (let j = 0; j < Temp.length; j++) { - Temp[j].style.display = "none"; - } - Temp[Temp.length - 1].style.display = ""; - }); - CurrentElement.addEventListener("mouseout", () => { - let Temp = CurrentElement.children; - for (let j = 0; j < Temp.length; j++) { - Temp[j].style.display = ""; - } - Temp[Temp.length - 1].style.display = "none"; - }); - CurrentElement.addEventListener("click", () => { - let SolutionID = SearchParams.get("sid"); - let ContestID = localStorage.getItem("UserScript-Solution-" + SolutionID + "-Contest"); - if (ContestID == null) { - let ProblemID = localStorage.getItem("UserScript-Solution-" + SolutionID + "-Problem"); - let ProblemName = localStorage.getItem("UserScript-Problem-" + ProblemID + "-Name"); - let CaseID = CurrentElement.children[1].innerText.substring(1); - GM_setClipboard("高老师,能发给我" + - ProblemID + "题:" + ProblemName + "," + - "提交编号" + SolutionID + "," + - "#" + CaseID + "测试点" + - "的数据吗?谢谢"); - } - else { - let ContestName = localStorage.getItem("UserScript-Contest-" + ContestID + "-Name"); - let ContestProblemID = localStorage.getItem("UserScript-Solution-" + SolutionID + "-PID-Contest"); - let ProblemID = localStorage.getItem("UserScript-Contest-" + ContestID + "-Problem-" + (ContestProblemID.charCodeAt(0) - 65) + "-PID"); - let ProblemName = localStorage.getItem("UserScript-Problem-" + ProblemID + "-Name"); - let CaseID = CurrentElement.children[1].innerText.substring(1); - GM_setClipboard("高老师,能发给我" + - "比赛" + ContestID + ":" + - ContestName + "," + - ContestProblemID + "题(" + ProblemID + "):" + ProblemName + "," + - "提交编号" + SolutionID + "," + - "#" + CaseID + "测试点" + - "的数据吗?谢谢"); - } - CopyButton.innerText = "已复制"; - setTimeout(() => { - CopyButton.innerText = "点此复制获取数据的语句"; - }, 1000); - }); - CurrentElement.onmouseout(); - } - } } else if (location.pathname == "/downloads.php") { let SoftwareList = document.querySelector("body > div > ul"); SoftwareList.remove();