From d9bba73162d39f85a191fcfc808b0239f5e03bea Mon Sep 17 00:00:00 2001 From: Izumiko Date: Fri, 5 Jul 2024 15:25:50 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=8D=E5=A4=8D=E5=BC=B9=E5=B9=95=E5=88=A4?= =?UTF-8?q?=E5=AE=9A=E6=9D=A1=E4=BB=B6=E5=8E=BB=E9=99=A4=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ede.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ede.js b/ede.js index c2f527c..6611ff9 100644 --- a/ede.js +++ b/ede.js @@ -1247,9 +1247,11 @@ // 使用Map去重 const unique_cmts = []; const cmtMap = new Map(); + const removeUserRegex = /,[^,]+$/; //p: time,modeId,colorValue,user all_cmts.forEach((comment) => { - if (!cmtMap.has(comment.p + comment.m)) { - cmtMap.set(comment.p + comment.m, true); + const p = comment.p.replace(removeUserRegex, ''); + if (!cmtMap.has(p + comment.m)) { + cmtMap.set(p + comment.m, true); unique_cmts.push(comment); } });