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],
description: "Removes Discord new image mosaic",
tags: ["image", "mosaic", "media"],
patches: [{
find: "Media Mosaic",
replacement: [
patches: [
{
find: ".oneByTwoLayoutThreeGrid",
replacement: [{
match: /mediaLayoutType:\i\.\i\.MOSAIC/,
replace: 'mediaLayoutType:"RESPONSIVE"',
},
{
match: /\i===\i\.\i\.MOSAIC/,
replace: "true",
replace: 'mediaLayoutType:"RESPONSIVE"'
},
{
match: /null!==\(\i=\i\.get\(\i\)\)&&void 0!==\i\?\i:"INVALID"/,
replace: '"INVALID"',
},]
},
],
{
find: "Messages.REMOVE_ATTACHMENT_TOOLTIP_TEXT",
replacement: {
match: /\i===\i\.\i\.MOSAIC/,
replace: "true"
}
}],
start() {
enableStyle(style);

View file

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