Skip to content

Commit 022040b

Browse files
authored
Merge pull request #871 from XMOJ-Script-dev/boomzero/cstooltip
Add tooltip for ProblemSwitcher
2 parents a015b5d + 822bb4d commit 022040b

File tree

3 files changed

+14
-3
lines changed

3 files changed

+14
-3
lines changed

Update.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3135,6 +3135,17 @@
31353135
}
31363136
],
31373137
"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": "现在, 你只需要将鼠标悬浮在比赛题目切换器上方, 即可查看题目名称"
31383149
}
31393150
}
31403151
}

XMOJ.user.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// ==UserScript==
22
// @name XMOJ
3-
// @version 2.4.5
3+
// @version 2.4.6
44
// @description XMOJ增强脚本
55
// @author @XMOJ-Script-dev, @langningchen and the community
66
// @namespace https://github/langningchen
@@ -1695,7 +1695,7 @@ async function main() {
16951695
if (problemList[i].url === location.href) {
16961696
activeClass = "active";
16971697
}
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>`;
16991699
}
17001700
document.body.appendChild(problemSwitcher);
17011701
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "xmoj-script",
3-
"version": "2.4.5",
3+
"version": "2.4.6",
44
"description": "an improvement script for xmoj.tech",
55
"main": "AddonScript.js",
66
"scripts": {

0 commit comments

Comments
 (0)