Skip to content
This repository has been archived by the owner on Oct 3, 2023. It is now read-only.

Commit

Permalink
Merge pull request #567 from langningchen:langningchen/issue564
Browse files Browse the repository at this point in the history
修复月赛界面下部缺失
  • Loading branch information
Chen LangNing authored Sep 30, 2023
2 parents fb71710 + 3b620a9 commit a216501
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
10 changes: 10 additions & 0 deletions Update.json
Original file line number Diff line number Diff line change
Expand Up @@ -633,6 +633,16 @@
"Description": "允许直接获取数据,而不是申请数据"
}
]
},
"0.3.186": {
"UpdateDate": 1696060570244,
"Prerelease": true,
"UpdateContents": [
{
"PR": 567,
"Description": "修复月赛界面下部缺失"
}
]
}
}
}
6 changes: 3 additions & 3 deletions XMOJ.user.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// ==UserScript==
// @name XMOJ
// @version 0.3.185
// @version 0.3.186
// @description XMOJ增强脚本
// @author @langningchen
// @namespace https://github/langningchen
Expand Down Expand Up @@ -3221,7 +3221,7 @@ int main()
Time = Temp[i].children[1].innerText;
}
let Body = Temp[i + 1].innerHTML;
NewsData.push({ "Title": Title, "Time": Time, "Body": Body });
NewsData.push({ "Title": Title, "Time": new Date(Time), "Body": Body });
}
document.querySelector("body > div > div.mt-3 > div > div.col-md-8").innerHTML = "";
for (let i = 0; i < NewsData.length; i++) {
Expand All @@ -3230,7 +3230,7 @@ int main()
let NewsRowHead = document.createElement("div");
NewsRowHead.className = "cnt-row-head title";
NewsRowHead.innerText = NewsData[i].Title;
if (NewsData[i].Time != 0) {
if (NewsData[i].Time.getTime() != 0) {
NewsRowHead.innerHTML += "<small class=\"ms-3\">" + NewsData[i].Time.toLocaleDateString() + "</small>";
}
NewsRow.appendChild(NewsRowHead);
Expand Down

0 comments on commit a216501

Please sign in to comment.