xmoj-script 2.4.5 → 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 CHANGED
@@ -3135,6 +3135,17 @@
3135
3135
  }
3136
3136
  ],
3137
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": "现在, 你只需要将鼠标悬浮在比赛题目切换器上方, 即可查看题目名称"
3138
3149
  }
3139
3150
  }
3140
3151
  }
package/XMOJ.user.js CHANGED
@@ -1,6 +1,6 @@
1
1
  // ==UserScript==
2
2
  // @name XMOJ
3
- // @version 2.4.5
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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xmoj-script",
3
- "version": "2.4.5",
3
+ "version": "2.4.6",
4
4
  "description": "an improvement script for xmoj.tech",
5
5
  "main": "AddonScript.js",
6
6
  "scripts": {