aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLuna <imlvnaa@gmail.com>2023-09-05 18:56:28 +0000
committerVen <ven@noreply.codeberg.org>2023-09-05 18:56:28 +0000
commit860d6edc7b0adbea7849c815c4c8404dd8b5095e (patch)
treeb192851e94370e4f47dd6e0f19853f7ebf661f79 /src
parent223b0366c642b4b96ace140680565711886414b1 (diff)
downloadVencord-860d6edc7b0adbea7849c815c4c8404dd8b5095e.tar.gz
Vencord-860d6edc7b0adbea7849c815c4c8404dd8b5095e.tar.bz2
Vencord-860d6edc7b0adbea7849c815c4c8404dd8b5095e.zip
HideAttachments: allow hiding stickers (#13)
Self explanatory Reviewed-on: https://codeberg.org/Ven/cord/pulls/13 Co-authored-by: Luna <imlvnaa@gmail.com> Co-committed-by: Luna <imlvnaa@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/hideAttachments.tsx4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/hideAttachments.tsx b/src/plugins/hideAttachments.tsx
index f608e05..36c34e4 100644
--- a/src/plugins/hideAttachments.tsx
+++ b/src/plugins/hideAttachments.tsx
@@ -49,7 +49,7 @@ export default definePlugin({
await this.buildCss();
addButton("HideAttachments", msg => {
- if (!msg.attachments.length && !msg.embeds.length) return null;
+ if (!msg.attachments.length && !msg.embeds.length && !msg.stickerItems.length) return null;
const isHidden = hiddenMessages.has(msg.id);
@@ -72,7 +72,7 @@ export default definePlugin({
async buildCss() {
const elements = [...hiddenMessages].map(id => `#message-accessories-${id}`).join(",");
style.textContent = `
- :is(${elements}) [class*="embedWrapper"] {
+ :is(${elements}) :is([class*="embedWrapper", [class*"clickableSticker"]) {
/* important is not necessary, but add it to make sure bad themes won't break it */
display: none !important;
}