Skip to content

Commit 84474cc

Browse files
authored
Merge pull request #854 from XMOJ-Script-dev/dev
Release
2 parents f86a45e + 8b2bf37 commit 84474cc

File tree

3 files changed

+45
-7
lines changed

3 files changed

+45
-7
lines changed

Update.json

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3021,6 +3021,43 @@
30213021
}
30223022
],
30233023
"Notes": "No release notes were provided for this release."
3024+
},
3025+
"2.2.1": {
3026+
"UpdateDate": 1756003502262,
3027+
"Prerelease": true,
3028+
"UpdateContents": [
3029+
{
3030+
"PR": 839,
3031+
"Description": "Fix formatting in feedback card text"
3032+
}
3033+
],
3034+
"Notes": "No release notes were provided for this release."
3035+
},
3036+
"2.2.2": {
3037+
"UpdateDate": 1757851046240,
3038+
"Prerelease": true,
3039+
"UpdateContents": [
3040+
{
3041+
"PR": 852,
3042+
"Description": "Fix the submit button on some pages"
3043+
}
3044+
],
3045+
"Notes": "No release notes were provided for this release."
3046+
},
3047+
"2.3.0": {
3048+
"UpdateDate": 1757851277491,
3049+
"Prerelease": false,
3050+
"UpdateContents": [
3051+
{
3052+
"PR": 839,
3053+
"Description": "Fix formatting in feedback card text"
3054+
},
3055+
{
3056+
"PR": 852,
3057+
"Description": "Fix the submit button on some pages"
3058+
}
3059+
],
3060+
"Notes": "随着 CI 更新, 相信以后的 release 都会有 release notes("
30243061
}
30253062
}
30263063
}

XMOJ.user.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// ==UserScript==
22
// @name XMOJ
3-
// @version 2.2.0
3+
// @version 2.3.0
44
// @description XMOJ增强脚本
55
// @author @XMOJ-Script-dev, @langningchen and the community
66
// @namespace https://github/langningchen
@@ -444,7 +444,7 @@ let UtilityEnabled = (Name) => {
444444
let storeCredential = async (username, password) => {
445445
if ('credentials' in navigator && window.PasswordCredential) {
446446
try {
447-
const credential = new PasswordCredential({ id: username, password: password });
447+
const credential = new PasswordCredential({id: username, password: password});
448448
await navigator.credentials.store(credential);
449449
} catch (e) {
450450
console.error(e);
@@ -454,7 +454,7 @@ let storeCredential = async (username, password) => {
454454
let getCredential = async () => {
455455
if ('credentials' in navigator && window.PasswordCredential) {
456456
try {
457-
return await navigator.credentials.get({ password: true, mediation: 'optional' });
457+
return await navigator.credentials.get({password: true, mediation: 'optional'});
458458
} catch (e) {
459459
console.error(e);
460460
}
@@ -1513,7 +1513,7 @@ async function main() {
15131513
FeedbackCardBody.className = "card-body";
15141514
let FeedbackCardText = document.createElement("p");
15151515
FeedbackCardText.className = "card-text";
1516-
FeedbackCardText.innerText = "如果您有任何建议或者发现了bug,请前往本项目的GitHub页面并提交issue。提交issue前请先搜索是否有相同的issue,如果有请在该issue下留言。请在issue中尽可能详细地描述您的问题,并且附上您的浏览器版本、操作系统版本、脚本版本、复现步骤等信息。谢谢您支持本项目。";
1516+
FeedbackCardText.innerText = "如果您有任何建议或者发现了 bug,请前往本项目的 GitHub 页面并提交 issue。提交 issue 前请先搜索是否有相同的 issue,如果有请在该 issue 下留言。请在 issue 中尽可能详细地描述您的问题,并且附上您的浏览器版本、操作系统版本、脚本版本、复现步骤等信息。谢谢您支持本项目。";
15171517
FeedbackCardBody.appendChild(FeedbackCardText);
15181518
let FeedbackCardLink = document.createElement("a");
15191519
FeedbackCardLink.className = "card-link";
@@ -1627,8 +1627,9 @@ async function main() {
16271627
}, 1000);
16281628
} else {
16291629
let PID = localStorage.getItem("UserScript-Contest-" + SearchParams.get("cid") + "-Problem-" + SearchParams.get("pid") + "-PID");
1630-
1631-
document.querySelector("body > div > div.mt-3 > center").lastChild.style.marginLeft = "10px";
1630+
if (document.querySelector("body > div > div.mt-3 > center").lastElementChild !== null) {
1631+
document.querySelector("body > div > div.mt-3 > center").lastElementChild.style.marginLeft = "10px";
1632+
}
16321633
//修复提交按钮
16331634
let SubmitLink = document.querySelector('.mt-3 > center:nth-child(1) > a:nth-child(12)');
16341635
if (SubmitLink == null) { //a special type of problem

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.2.0",
3+
"version": "2.3.0",
44
"description": "an improvement script for xmoj.tech",
55
"main": "AddonScript.js",
66
"scripts": {

0 commit comments

Comments
 (0)