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) => {
444444let 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) => {
454454let 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
0 commit comments