noMosaic: fix (#1849)

This commit is contained in:
AutumnVN 2023-10-25 19:47:08 +07:00 committed by V
parent 09b646b860
commit 940193c30b
2 changed files with 15 additions and 13 deletions

View file

@ -15,22 +15,24 @@ export default definePlugin({
authors: [Devs.AutumnVN], authors: [Devs.AutumnVN],
description: "Removes Discord new image mosaic", description: "Removes Discord new image mosaic",
tags: ["image", "mosaic", "media"], tags: ["image", "mosaic", "media"],
patches: [{ patches: [
find: "Media Mosaic",
replacement: [
{ {
find: ".oneByTwoLayoutThreeGrid",
replacement: [{
match: /mediaLayoutType:\i\.\i\.MOSAIC/, match: /mediaLayoutType:\i\.\i\.MOSAIC/,
replace: 'mediaLayoutType:"RESPONSIVE"', replace: 'mediaLayoutType:"RESPONSIVE"'
},
{
match: /\i===\i\.\i\.MOSAIC/,
replace: "true",
}, },
{ {
match: /null!==\(\i=\i\.get\(\i\)\)&&void 0!==\i\?\i:"INVALID"/, match: /null!==\(\i=\i\.get\(\i\)\)&&void 0!==\i\?\i:"INVALID"/,
replace: '"INVALID"', replace: '"INVALID"',
},]
}, },
], {
find: "Messages.REMOVE_ATTACHMENT_TOOLTIP_TEXT",
replacement: {
match: /\i===\i\.\i\.MOSAIC/,
replace: "true"
}
}], }],
start() { start() {
enableStyle(style); enableStyle(style);

View file

@ -1,3 +1,3 @@
[class^="nonMediaAttachmentsContainer-"] [class*="messageAttachment-"] { [class^="nonMediaAttachmentsContainer_"] [class*="messageAttachment_"] {
position: relative; position: relative;
} }