xmoj-script 2.4.4 → 2.4.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Update.json +22 -0
- package/XMOJ.user.js +5 -2
- package/package.json +1 -1
package/Update.json
CHANGED
@@ -3124,6 +3124,28 @@
|
|
3124
3124
|
}
|
3125
3125
|
],
|
3126
3126
|
"Notes": "#860 ..."
|
3127
|
+
},
|
3128
|
+
"2.4.5": {
|
3129
|
+
"UpdateDate": 1759487413226,
|
3130
|
+
"Prerelease": true,
|
3131
|
+
"UpdateContents": [
|
3132
|
+
{
|
3133
|
+
"PR": 869,
|
3134
|
+
"Description": "Update CSS selector (again...)"
|
3135
|
+
}
|
3136
|
+
],
|
3137
|
+
"Notes": "为什么这个破东西老是换位置"
|
3138
|
+
},
|
3139
|
+
"2.4.6": {
|
3140
|
+
"UpdateDate": 1759548958578,
|
3141
|
+
"Prerelease": true,
|
3142
|
+
"UpdateContents": [
|
3143
|
+
{
|
3144
|
+
"PR": 871,
|
3145
|
+
"Description": "Add tooltip for ProblemSwitcher"
|
3146
|
+
}
|
3147
|
+
],
|
3148
|
+
"Notes": "现在, 你只需要将鼠标悬浮在比赛题目切换器上方, 即可查看题目名称"
|
3127
3149
|
}
|
3128
3150
|
}
|
3129
3151
|
}
|
package/XMOJ.user.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
// ==UserScript==
|
2
2
|
// @name XMOJ
|
3
|
-
// @version 2.4.
|
3
|
+
// @version 2.4.6
|
4
4
|
// @description XMOJ增强脚本
|
5
5
|
// @author @XMOJ-Script-dev, @langningchen and the community
|
6
6
|
// @namespace https://github/langningchen
|
@@ -1695,7 +1695,7 @@ async function main() {
|
|
1695
1695
|
if (problemList[i].url === location.href) {
|
1696
1696
|
activeClass = "active";
|
1697
1697
|
}
|
1698
|
-
problemSwitcher.innerHTML += `<a href="${problemList[i].url}" class="btn btn-outline-secondary mb-2 ${activeClass}">${buttonText}</a>`;
|
1698
|
+
problemSwitcher.innerHTML += `<a href="${problemList[i].url}" title="${problemList[i].title.trim()}" class="btn btn-outline-secondary mb-2 ${activeClass}">${buttonText}</a>`;
|
1699
1699
|
}
|
1700
1700
|
document.body.appendChild(problemSwitcher);
|
1701
1701
|
}
|
@@ -1726,6 +1726,9 @@ async function main() {
|
|
1726
1726
|
if (SubmitLink == null) { //为什么这个破东西老是换位置
|
1727
1727
|
SubmitLink = document.querySelector('.mt-3 > center:nth-child(1) > a:nth-child(7)');
|
1728
1728
|
}
|
1729
|
+
if (SubmitLink == null) { //tmd又换位置
|
1730
|
+
SubmitLink = document.querySelector('.mt-3 > center:nth-child(1) > a:nth-child(8)');
|
1731
|
+
}
|
1729
1732
|
let SubmitButton = document.createElement('button');
|
1730
1733
|
SubmitButton.id = 'SubmitButton';
|
1731
1734
|
SubmitButton.className = 'btn btn-outline-secondary';
|