From 6e9e29df9b5d59bc9340408c5a862eba8817b2df Mon Sep 17 00:00:00 2001 From: Xarth Date: Thu, 5 Sep 2024 22:50:08 +0800 Subject: [PATCH] fix bug --- ede.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ede.js b/ede.js index a85fe4f..a98cb58 100644 --- a/ede.js +++ b/ede.js @@ -977,7 +977,7 @@ try { let response = await makeGetRequest(url_all); let data = isInTampermonkey ? JSON.parse(response) : await response.json(); - const nonDandan = /^.{3,}\]/; // 匹配非弹弹play弹幕 + const nonDandan = /^\[(?!BiliBili|Gamer).{3,}\]/; // 匹配其他弹幕 let hasRelated = false; for (const c of data.comments) { if (nonDandan.test(c.p.split(',').pop())) { @@ -1406,7 +1406,7 @@ .filter((comment) => { const user = comment.p.split(',')[3]; const modeId = parseInt(comment.p.split(',')[1], 10); - return !danmakuFilteRule.test(comment.m) && enabledMode.includes(modeId); + return !danmakuFilteRule.test(user) && enabledMode.includes(modeId); }) .map((comment) => { const [time, modeId, colorValue] = comment.p.split(',').map((v, i) => i === 0 ? parseFloat(v) : parseInt(v, 10));