some fixes

This commit is contained in:
thororen1234 2026-02-04 23:00:28 -05:00
parent c7ffbd204a
commit b42c702f1e
No known key found for this signature in database
9 changed files with 24 additions and 18 deletions

View file

@ -247,11 +247,17 @@ export default definePlugin({
patches: [
{
find: 'this,"_changeCallbacks",',
replacement: {
match: /\i\(this,"_changeCallbacks",/,
replace: "Reflect.defineProperty(this,Symbol.toStringTag,{value:this.getName(),configurable:!0,writable:!0,enumerable:!1}),$&"
}
find: "&&this.initializeIfNeeded()",
replacement: [
{
match: /\i\(this,"_changeCallbacks",/,
replace: "Reflect.defineProperty(this,Symbol.toStringTag,{value:this.getName(),configurable:!0,writable:!0,enumerable:!1}),$&"
},
{
match: /\i&&this\.initializeIfNeeded\(\)/,
replace: "$&,Reflect.defineProperty(this,Symbol.toStringTag,{value:this.getName(),configurable:!0,writable:!0,enumerable:!1})"
}
]
}
],

View file

@ -225,7 +225,7 @@ export default definePlugin({
// Discord hides buttons on your own Rich Presence for some reason. This patch disables that behaviour
patches: [
{
find: ".buttons.length)>=1",
find: ".USER_PROFILE_ACTIVITY_BUTTONS),",
replacement: {
match: /.getId\(\)===\i.id/,
replace: "$& && false"

View file

@ -299,7 +299,7 @@ export default definePlugin({
]
},
{
find: "}renderEmbeds(",
find: "}renderStickersAccessories(",
replacement: [
{
// Call our function to decide whether the embed should be ignored or not

View file

@ -163,7 +163,7 @@ export default definePlugin({
patches: [
{
find: ".renderLinkComponent)?",
find: "disableArrowKeySeek:!0",
replacement: [
{
match: /useFullWidth:!0,shouldLink:/,

View file

@ -408,7 +408,7 @@ export default definePlugin({
{
// Updated message transformer(?)
find: "THREAD_STARTER_MESSAGE?null==",
find: ".PREMIUM_REFERRAL&&(",
replacement: [
{
// Pass through editHistory & deleted & original attachments to the "edited message" transformer

View file

@ -72,7 +72,7 @@ export default definePlugin({
patches: [
{
find: '"private-channels-".concat(',
find: '"dm-quick-launcher"===',
replacement: [
{
// Filter out pinned channels from the private channel list
@ -87,15 +87,15 @@ export default definePlugin({
// Rendering
{
match: /"renderRow",(\i)=>{(?<="renderDM",.+?(\i\.\i),\{channel:.+?)/,
match: /renderRow(?:",|=)(\i)=>{(?<=renderDM(?:",|=).+?(\i\.\i),\{channel:.+?)/,
replace: "$&if($self.isChannelIndex($1.section, $1.row))return $self.renderChannel($1.section,$1.row,$2)();"
},
{
match: /"renderSection",(\i)=>{/,
match: /renderSection(?:",|=)(\i)=>{/,
replace: "$&if($self.isCategoryIndex($1.section))return $self.renderCategory($1);"
},
{
match: /"renderSection".{0,300}?"span",{/,
match: /renderSection(?:",|=).{0,300}?"span",{/,
replace: "$&...$self.makeSpanProps(),"
},
@ -105,7 +105,7 @@ export default definePlugin({
replace: "$1($2-$self.categoryLen())"
},
{
match: /"getRowHeight",\((\i),(\i)\)=>{/,
match: /getRowHeight(?:",|=)\((\i),(\i)\)=>{/,
replace: "$&if($self.isChannelHidden($1,$2))return 0;"
},

View file

@ -52,7 +52,7 @@ export default definePlugin({
},
},
{
find: "INVITES_DISABLED))||",
find: /\.INVITES_DISABLED\)(?:\))?\|\|/,
predicate: () => settings.store.showInvitesPaused,
replacement: {
match: /\i\.\i\.can\(\i\.\i.MANAGE_GUILD,\i\)/,

View file

@ -51,7 +51,7 @@ export default definePlugin({
},
},
{
find: '"displayName","SpotifyStore")',
find: "}getPlayableComputerDevices(){",
replacement: [
{
predicate: () => settings.store.noSpotifyAutoPause,

View file

@ -54,9 +54,9 @@ export default definePlugin({
settings,
patches: [
{
find: '.banner)==null?"COMPLETE"',
find: ':"SHOULD_LOAD");',
replacement: {
match: /(?<=void 0:)\i.getPreviewBanner\(\i,\i,\i\)/,
match: /\i(?:\?)?.getPreviewBanner\(\i,\i,\i\)(?=.{0,100}"COMPLETE")/,
replace: "$self.patchBannerUrl(arguments[0])||$&"
}