diff --git a/src/equicordplugins/customUserColors/index.tsx b/src/equicordplugins/customUserColors/index.tsx index 69a108db0..9efc00684 100644 --- a/src/equicordplugins/customUserColors/index.tsx +++ b/src/equicordplugins/customUserColors/index.tsx @@ -105,7 +105,7 @@ export default definePlugin({ { find: "PrivateChannel.renderAvatar", replacement: { - match: /(subText:\i\(\),)/, + match: /(withDisplayNameStyles\]:\i\}\),children:\i\}\),)/, replace: "$1style:{color:`${$self.colorDMList(arguments[0])}`}," }, predicate: () => settings.store.dmList, diff --git a/src/equicordplugins/keywordNotify/index.tsx b/src/equicordplugins/keywordNotify/index.tsx index 33ba20a4a..d89bd4020 100644 --- a/src/equicordplugins/keywordNotify/index.tsx +++ b/src/equicordplugins/keywordNotify/index.tsx @@ -322,8 +322,8 @@ export default definePlugin({ { find: "location:\"RecentsPopout\"});", replacement: { - match: /:(\i)===\i\.\i\.MENTIONS\?\(0,.+?setTab:(\i),onJump:(\i),badgeState:\i,closePopout:(\i)/, - replace: ": $1 === 8 ? $self.tryKeywordMenu($2, $3, $4) $&" + match: /(?<=setTab:(\i),badgeState:\i,closePopout:(\i).{0,50}):(\i)===\i\.\i\.MENTIONS\?\(0,.+?onJump:(\i)/, + replace: ": $3 === 8 ? $self.tryKeywordMenu($1, $2, $4) $&" } }, { diff --git a/src/equicordplugins/whosWatching/index.tsx b/src/equicordplugins/whosWatching/index.tsx index 8bee85b52..c7e77211a 100644 --- a/src/equicordplugins/whosWatching/index.tsx +++ b/src/equicordplugins/whosWatching/index.tsx @@ -84,7 +84,7 @@ export default definePlugin({ { find: "this.renderEmbeddedActivity()", replacement: { - match: /(?<=render\(\).{0,500}children.{0,50})"div"(?=.{0,500}this\.renderEmbeddedActivity\(\))/, + match: /"div"(?=.{0,100}this.renderActions)/, replace: "$self.WrapperComponent" } } diff --git a/src/plugins/pinDms/index.tsx b/src/plugins/pinDms/index.tsx index 6426c8038..bf4f5252c 100644 --- a/src/plugins/pinDms/index.tsx +++ b/src/plugins/pinDms/index.tsx @@ -61,6 +61,11 @@ export const settings = definePluginSettings({ type: OptionType.CUSTOM, default: {} as Record, description: "", + }, + disableCreateDMButton: { + type: OptionType.BOOLEAN, + description: "Disabled the create dm button", + default: true } }); @@ -154,6 +159,14 @@ export default definePlugin({ replace: "$self.getAllUncollapsedChannels().concat($&.filter(c=>!$self.isPinned(c)))" } }, + { + find: ".createDMButtonContainer", + replacement: { + match: /"full-width"===\i/, + replace: "$&&&false" + }, + predicate: () => settings.store.disableCreateDMButton + }, ], sections: null as number[] | null, diff --git a/src/webpack/common/components.ts b/src/webpack/common/components.ts index bf7c9dd1b..847579587 100644 --- a/src/webpack/common/components.ts +++ b/src/webpack/common/components.ts @@ -24,7 +24,7 @@ import { waitForComponent } from "./internal"; const FormTitle = waitForComponent("FormTitle", filters.componentByCode('["defaultMargin".concat', '="h5"')); -const FormText = waitForComponent("FormText", filters.componentByCode(".SELECTABLE),", ".DISABLED:")); +const FormText = waitForComponent("FormText", filters.componentByCode(".Text,", /\i=\i:\i&&\(\i=\i\)/)); const FormSection = waitForComponent("FormSection", filters.componentByCode(".titleId)")); const FormDivider = waitForComponent("FormDivider", filters.componentByCode(".divider,", ",style:", '"div"', /\.divider,\i\),style:/)); diff --git a/src/webpack/common/utils.ts b/src/webpack/common/utils.ts index c106a107c..e001bae8b 100644 --- a/src/webpack/common/utils.ts +++ b/src/webpack/common/utils.ts @@ -211,7 +211,7 @@ export const DisplayProfileUtils: t.DisplayProfileUtils = mapMangledModuleLazy(/ export const DateUtils: t.DateUtils = mapMangledModuleLazy("millisecondsInUnit:", { calendarFormat: filters.byCode("sameElse"), - dateFormat: filters.byCode('":'), - isSameDay: filters.byCode("Math.abs(+"), + dateFormat: filters.byCode('":"'), + isSameDay: filters.byCode(/Math.abs\(\i-/), diffAsUnits: filters.byCode("days:0", "millisecondsInUnit") });