Fix WhoReacted, remove NoMosaic for now
This commit is contained in:
parent
afadb893f5
commit
233a2cf36a
2 changed files with 2 additions and 60 deletions
|
|
@ -1,46 +0,0 @@
|
|||
/*
|
||||
* Vencord, a Discord client mod
|
||||
* Copyright (c) 2023 Vendicated and contributors
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
import { definePluginSettings } from "@api/Settings";
|
||||
import { Devs } from "@utils/constants";
|
||||
import definePlugin, { OptionType } from "@utils/types";
|
||||
|
||||
const settings = definePluginSettings({
|
||||
inlineVideo: {
|
||||
description: "Play videos without carousel modal",
|
||||
type: OptionType.BOOLEAN,
|
||||
default: true,
|
||||
restartNeeded: true
|
||||
}
|
||||
});
|
||||
|
||||
export default definePlugin({
|
||||
name: "NoMosaic",
|
||||
authors: [Devs.AutumnVN],
|
||||
description: "Removes Discord image mosaic",
|
||||
tags: ["Media", "Appearance", "Chat"],
|
||||
searchTerms: ["image", "mosaic", "media"],
|
||||
|
||||
settings,
|
||||
|
||||
patches: [
|
||||
{
|
||||
find: '"PLAINTEXT_PREVIEW":"OTHER"',
|
||||
replacement: {
|
||||
match: /"IMAGE"===\i\|\|"VIDEO"===\i\|\|"CLIP"===\i/,
|
||||
replace: "false"
|
||||
}
|
||||
},
|
||||
{
|
||||
find: "renderAttachments(",
|
||||
predicate: () => settings.store.inlineVideo,
|
||||
replacement: {
|
||||
match: /url:(\i)\.url\}\);return /,
|
||||
replace: "$&$1.content_type?.startsWith('image/')&&"
|
||||
}
|
||||
},
|
||||
]
|
||||
});
|
||||
|
|
@ -32,20 +32,8 @@ interface ReactionCacheEntry {
|
|||
|
||||
interface ReactionProps {
|
||||
message: Message;
|
||||
readOnly: boolean;
|
||||
isLurking: boolean;
|
||||
isPendingMember: boolean;
|
||||
useChatFontScaling: boolean;
|
||||
emoji: CustomEmoji;
|
||||
count: number;
|
||||
burst_user_ids: any[];
|
||||
burst_count: number;
|
||||
burst_colors: any[];
|
||||
burst_me: boolean;
|
||||
me: boolean;
|
||||
type: number;
|
||||
hideEmoji: boolean;
|
||||
remainingBurstCurrency: number;
|
||||
}
|
||||
|
||||
let Scroll: any = null;
|
||||
|
|
@ -148,8 +136,8 @@ export default definePlugin({
|
|||
{
|
||||
find: ",reactionRef:",
|
||||
replacement: {
|
||||
match: /(\i)\?null:\(0,\i\.jsx\)\(\i\.\i,{className:\i\.reactionCount,.*?}\),/,
|
||||
replace: "$&$1?null:$self.renderUsers(this?.props),"
|
||||
match: /(\i)\?null:\(0,\i\.jsx\)\(\i\.\i,{className:\i\.reactionCount,.*?}\),(?<=(emoji:\i,message:\i,type:\i).+?)/,
|
||||
replace: "$&$1?null:$self.renderUsers({$2}),"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue