xmoj-script 1.2.55 → 1.2.56
Sign up to get free protection for your applications and to get access to all the features.
- package/Update.json +11 -0
- package/XMOJ.user.js +10 -5
- package/package.json +1 -1
package/Update.json
CHANGED
@@ -2431,6 +2431,17 @@
|
|
2431
2431
|
}
|
2432
2432
|
],
|
2433
2433
|
"Notes": "No release notes were provided for this release."
|
2434
|
+
},
|
2435
|
+
"1.2.56": {
|
2436
|
+
"UpdateDate": 1723956966458,
|
2437
|
+
"Prerelease": true,
|
2438
|
+
"UpdateContents": [
|
2439
|
+
{
|
2440
|
+
"PR": 704,
|
2441
|
+
"Description": "登录界面优化"
|
2442
|
+
}
|
2443
|
+
],
|
2444
|
+
"Notes": "No release notes were provided for this release."
|
2434
2445
|
}
|
2435
2446
|
}
|
2436
2447
|
}
|
package/XMOJ.user.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
// ==UserScript==
|
2
2
|
// @name XMOJ
|
3
|
-
// @version 1.2.
|
3
|
+
// @version 1.2.56
|
4
4
|
// @description XMOJ增强脚本
|
5
5
|
// @author @XMOJ-Script-dev, @langningchen and the community
|
6
6
|
// @namespace https://github/langningchen
|
@@ -878,10 +878,15 @@ async function main() {
|
|
878
878
|
}
|
879
879
|
if (UtilityEnabled("ResetType")) {
|
880
880
|
if (document.querySelector("#profile") != undefined && document.querySelector("#profile").innerHTML == "登录") {
|
881
|
-
|
882
|
-
|
883
|
-
|
884
|
-
|
881
|
+
let PopupUL = document.querySelector("#navbar > ul.nav.navbar-nav.navbar-right > li > ul");
|
882
|
+
PopupUL.innerHTML = `<li class="dropdown-item">登录</li>`;
|
883
|
+
PopupUL.children[0].addEventListener("click", () => {
|
884
|
+
location.href = "https://www.xmoj.tech/loginpage.php";
|
885
|
+
});
|
886
|
+
let parentLi = document.querySelector("#navbar > ul.nav.navbar-nav.navbar-right > li");
|
887
|
+
document.addEventListener("click", (event) => { if (!parentLi.contains(event.target) && PopupUL.style.display === 'block') {hideDropdownItems();}});
|
888
|
+
}
|
889
|
+
else if (document.querySelector("#navbar > ul.nav.navbar-nav.navbar-right > li > ul > li:nth-child(3) > a > span") != undefined && document.querySelector("#navbar > ul.nav.navbar-nav.navbar-right > li > ul > li:nth-child(3) > a > span").innerText != "个人中心") {
|
885
890
|
let PopupUL = document.querySelector("#navbar > ul.nav.navbar-nav.navbar-right > li > ul");
|
886
891
|
PopupUL.innerHTML = `<li class="dropdown-item">修改帐号</li>
|
887
892
|
<li class="dropdown-item">个人中心</li>
|