Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync Dev #54

Merged
merged 7 commits into from
Oct 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions Update.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,16 @@
"Description": "增加名字"
}
]
},
"1.0.202": {
"UpdateDate": 1696337480177,
"Prerelease": false,
"UpdateContents": [
{
"PR": 26,
"Description": "增加名字"
}
]
}
}
}
8 changes: 4 additions & 4 deletions XMOJ.user.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// ==UserScript==
// @name XMOJ
// @version 1.0.201
// @version 1.0.202
// @description XMOJ增强脚本
// @author @PythonSmall-Q
// @namespace https://github/langningchen
Expand Down Expand Up @@ -334,7 +334,7 @@ GM_registerMenuCommand("重置数据", () => {
});

let SearchParams = new URLSearchParams(location.search);
let ServerURL = (UtilityEnabled("DebugMode") ? "https://xmoj-script-dev.github.io/XMOJ-Script" : "https://www.seanoj.edu.eu.org")
let ServerURL = (UtilityEnabled("DebugMode") ? "https://xmoj-script-dev.github.io/XMOJ-Script" : "https://web.xmoj-bbs.tech")
let CurrentUsername = document.querySelector("#profile").innerText;
CurrentUsername = CurrentUsername.replaceAll(/[^a-zA-Z0-9]/g, "");
let IsAdmin = AdminUserList.indexOf(CurrentUsername) !== -1;
Expand Down Expand Up @@ -670,7 +670,7 @@ else {
.then((Response) => {
let CurrentVersion = GM_info.script.version;
let LatestVersion;
for (let i = Object.keys(Response.UpdateHistory).length - 1; i > 0; i--) {
for (let i = Object.keys(Response.UpdateHistory).length - 1; i >= 0; i--) {
let VersionInfo = Object.keys(Response.UpdateHistory)[i];
if (UtilityEnabled("DebugMode") || Response.UpdateHistory[VersionInfo].Prerelease == false) {
LatestVersion = VersionInfo;
Expand Down Expand Up @@ -4089,7 +4089,7 @@ int main()
let ReplyContentElement = document.createElement("div"); CardBodyElement.appendChild(ReplyContentElement);
ReplyContentElement.innerHTML = PurifyHTML(marked.parse(Replies[i].Content)).replaceAll(/@([a-zA-Z0-9]+)/g, `<b>@</b><span class="ms-1 Usernames">$1</span>`);
if (Replies[i].EditTime != null) {
if (Replies[i].EditPerson !== CurrentUsername) {
if (Replies[i].EditPerson == CurrentUsername) {
ReplyContentElement.innerHTML += `<span class="text-muted" style="font-size: 12px">最后编辑于${GetRelativeTime(Replies[i].EditTime)}</span>`;
}
else {
Expand Down