From 39d55f64aaf5a9428865aa30d9f1b54e481c39df Mon Sep 17 00:00:00 2001 From: Isaac Date: Wed, 18 Sep 2024 16:03:48 +0300 Subject: [PATCH] ugh 2 --- src/plugins/hideMessage/index.tsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/plugins/hideMessage/index.tsx b/src/plugins/hideMessage/index.tsx index 7605e6774..b9a11b241 100644 --- a/src/plugins/hideMessage/index.tsx +++ b/src/plugins/hideMessage/index.tsx @@ -60,12 +60,9 @@ export default definePlugin({ }, async buildCss() { - let chatMessages = "" - let messagesContent = "" - hiddenMessages.forEach((ids) => { - chatMessages += `#chat-messages-${JSON.parse(ids).channelId}-${JSON.parse(ids).messageId},` - messagesContent += `#message-content-${JSON.parse(ids).messageId},` - }) + const chatMessages = [...hiddenMessages].map(ids => `#chat-messages-${JSON.parse(ids).channelId}-${JSON.parse(ids).messageId}`).join(","); + const messagesContent = [...hiddenMessages].map(ids => `#message-content-${JSON.parse(ids).messageId}`).join(","); + const messagesAccessories = [...hiddenMessages].map(ids => `#message-accessories-${JSON.parse(ids).messageId}`).join(","); style.textContent = ` :is(${chatMessages}) :is([class*="message_d5deea"]) :is([class*="embedWrapper"], [class*="clickableSticker"]) { display: none !important; @@ -73,6 +70,9 @@ export default definePlugin({ :is(${messagesContent}) { display: none !important; } + :is(${messagesAccessories}) { + display: none !important; + } `; },