Skip to content
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
11 changes: 11 additions & 0 deletions Update.json
Original file line number Diff line number Diff line change
Expand Up @@ -3396,6 +3396,17 @@
}
],
"Notes": "Fix contest ranking table colors in dark mode (contestrank-oi.php and contestrank-correct.php)"
},
"3.2.2": {
"UpdateDate": 1771848993140,
"Prerelease": true,
"UpdateContents": [
{
"PR": 919,
"Description": "Gate WebSocket toast notifications by per-feature popup settings"
}
],
"Notes": "Fix WebSocket notification toasts ignoring per-feature popup settings (BBSPopup/MessagePopup)."
}
}
}
12 changes: 7 additions & 5 deletions XMOJ.user.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// ==UserScript==
// @name XMOJ
// @version 3.2.1
// @version 3.2.2
// @description XMOJ增强脚本
// @author @XMOJ-Script-dev, @langningchen and the community
// @namespace https://github/langningchen
Expand Down Expand Up @@ -650,11 +650,13 @@ function HandleNotificationMessage(event) {
console.log("WebSocket: Server confirmed connection at timestamp", notification.timestamp);
}
} else if (notification.type === 'bbs_mention') {
// Backend now provides all data needed for immediate display
CreateAndShowBBSMentionToast(notification.data);
if (UtilityEnabled("BBSPopup")) {
CreateAndShowBBSMentionToast(notification.data);
}
} else if (notification.type === 'mail_mention') {
// Backend now provides all data needed for immediate display
CreateAndShowMailMentionToast(notification.data);
if (UtilityEnabled("MessagePopup")) {
CreateAndShowMailMentionToast(notification.data);
}
} else if (notification.type === 'pong') {
if (UtilityEnabled("DebugMode")) {
console.log("WebSocket: Received pong");
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "xmoj-script",
"version": "3.2.1",
"version": "3.2.2",
"description": "an improvement script for xmoj.tech",
"main": "AddonScript.js",
"scripts": {
Expand Down
Loading