增加 神秘箱子的屏蔽

This commit is contained in:
2026-04-17 15:27:40 +08:00
parent 0f4de941db
commit 0e8a1669b9
4 changed files with 30 additions and 5 deletions
@@ -39,7 +39,7 @@
const onlineCountBottom = document.getElementById('online-count-bottom');
const BLOCKED_SYSTEM_SENDERS_STORAGE_KEY = 'chat_blocked_system_senders';
const CHAT_SOUND_MUTED_STORAGE_KEY = 'chat_sound_muted';
const BLOCKABLE_SYSTEM_SENDERS = ['钓鱼播报', '星海小博士', '百家乐', '跑马','神秘箱子'];
const BLOCKABLE_SYSTEM_SENDERS = ['钓鱼播报', '星海小博士', '百家乐', '跑马', '神秘箱子'];
// ── 消息区:手机端双触发打开用户名片(PC 端靠 ondblclick 内联属性)──
// span[data-u] 由 clickableUser() 生成,touchend 委托至容器避免每条消息单独绑定
@@ -200,6 +200,7 @@
const doctorCheckbox = document.getElementById('block-sender-doctor');
const baccaratCheckbox = document.getElementById('block-sender-baccarat');
const horseRaceCheckbox = document.getElementById('block-sender-horse-race');
const mysteryBoxCheckbox = document.getElementById('block-sender-mystery-box');
if (fishingCheckbox) {
fishingCheckbox.checked = blockedSystemSenders.has('钓鱼播报');
@@ -216,6 +217,10 @@
if (horseRaceCheckbox) {
horseRaceCheckbox.checked = blockedSystemSenders.has('跑马');
}
if (mysteryBoxCheckbox) {
mysteryBoxCheckbox.checked = blockedSystemSenders.has('神秘箱子');
}
}
/**
@@ -232,10 +237,18 @@
return '钓鱼播报';
}
if (fromUser === '神秘箱子') {
return '神秘箱子';
}
if (fromUser === '星海小博士') {
return '星海小博士';
}
if ((fromUser === '系统传音' || fromUser === '系统') && content.includes('神秘箱子')) {
return '神秘箱子';
}
if ((fromUser === '系统传音' || fromUser === '系统') && content.includes('百家乐')) {
return '百家乐';
}
@@ -952,7 +965,7 @@
let timeStrOverride = false;
// 系统用户名列表(不可被选为聊天对象)
const systemUsers = ['钓鱼播报', '星海小博士', '系统传音', '系统公告', '送花播报', '系统', '欢迎', '系统播报'];
const systemUsers = ['钓鱼播报', '星海小博士', '系统传音', '系统公告', '送花播报', '系统', '欢迎', '系统播报', '神秘箱子'];
// 动作文字映射表:情绪型(着/地,放"对"之前)和动作型(了,替换"对X说"
const actionTextMap = {