Fix Patches
This commit is contained in:
parent
fc36d08465
commit
9e71344002
6 changed files with 20 additions and 7 deletions
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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) $&"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -61,6 +61,11 @@ export const settings = definePluginSettings({
|
|||
type: OptionType.CUSTOM,
|
||||
default: {} as Record<string, Category[]>,
|
||||
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,
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ import { waitForComponent } from "./internal";
|
|||
|
||||
|
||||
const FormTitle = waitForComponent<t.FormTitle>("FormTitle", filters.componentByCode('["defaultMargin".concat', '="h5"'));
|
||||
const FormText = waitForComponent<t.FormText>("FormText", filters.componentByCode(".SELECTABLE),", ".DISABLED:"));
|
||||
const FormText = waitForComponent<t.FormText>("FormText", filters.componentByCode(".Text,", /\i=\i:\i&&\(\i=\i\)/));
|
||||
const FormSection = waitForComponent<t.FormSection>("FormSection", filters.componentByCode(".titleId)"));
|
||||
const FormDivider = waitForComponent<t.FormDivider>("FormDivider", filters.componentByCode(".divider,", ",style:", '"div"', /\.divider,\i\),style:/));
|
||||
|
||||
|
|
|
|||
|
|
@ -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")
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue