Fix Some Patches

This commit is contained in:
thororen1234 2026-02-04 15:46:39 -05:00
parent 1267b958ba
commit 1fad9a2c48
No known key found for this signature in database
7 changed files with 33 additions and 33 deletions

View file

@ -65,8 +65,8 @@ export default definePlugin({
find: "role:\"listitem\",innerRef",
replacement: {
// We cant access the user id here, so we take the banner property we set earlier
match: /focusProps.\i\}=(\i).*?children:\[/,
replace: "$&$1.banner,"
match: /children:\[(?=.{0,100}\.MEMBER_LIST)/,
replace: "$&arguments[0].banner,"
}
}
],

View file

@ -54,7 +54,7 @@ export default definePlugin({
replace: "$1arguments[0]?.collected?.isDragging?$self.dragItem():$2",
},
{
match: /\[(\i\.\i)\](?=.{0,5}\[null!=)/,
match: /\[(\i\.\i)\](?=.{0,5}\[\i\?\?)/,
replace: '[arguments[0].collected.isDragging?"":$1]',
},
{
@ -62,11 +62,11 @@ export default definePlugin({
replace: "$1,[collected,drag]=$self.drag(arguments[0])",
},
{
match: /(onFocus".{0,50}\(\i,{ref:)(\i),/,
match: /(onFocus:.{0,50}\(\i,{ref:)(\i),/,
replace: '$1arguments[0]?.descriptor?.category==="FAVORITES"?drag:$2,collected:collected,',
},
{
match: /(,\{key:\i,ref:\i)(?=\}\),)/,
match: /(key:\i,ref:\i)(?=\},\i)/,
replace: '$1,style:{position:"relative"}',
},
{

View file

@ -52,7 +52,7 @@ export default definePlugin({
find: ".GUILD_CREATE_INVITE_SUGGESTION,defaultMaxAge",
replacement: [
{
match: /(?<=maxAge:)null!=\(\i=null!=\i\?\i:\i\)\?\i:\i.\i/,
match: /(?<=maxAge:)\i\?\?\i\?\?\i\.\i/,
replace: "$self.settings.store.inviteDuration"
},
{
@ -60,7 +60,7 @@ export default definePlugin({
replace: "$self.settings.store.maxUses"
},
{
match: /(?<=temporary:)null!=\i&&\i/,
match: /(?<=temporary:)\i\?\?!1/,
replace: "$self.settings.store.temporaryMembership"
}
]

View file

@ -1255,7 +1255,7 @@ export default definePlugin({
{
// Hides the Quest icon from members list items when
// a user is playing a game tied to an active Quest.
find: "),\"activity-\".concat",
find: '"ActivityStatus")',
group: true,
replacement: [
{
@ -1312,15 +1312,15 @@ export default definePlugin({
{
// Replaces the default displayed Quest with the soonest to
// be completed Quest which is actively being auto-completed.
find: "questDeliveryOverride)?",
find: '"useQuestBarQuest"})',
replacement: {
match: /(?<=null}\);return )(\i\?\i:\i)/,
match: /(?<=null\);return )(\i\?\i:\i)/,
replace: "$self.getQuestPanelOverride()??($1)"
}
},
{
// Hides the Friends List "Active Now" promotion.
find: '"application-stream-"',
find: "`application-stream-",
group: true,
replacement: [
{
@ -1345,7 +1345,7 @@ export default definePlugin({
},
{
// QUESTS_FETCH_QUEST_TO_DELIVER_BEGIN
match: /(?=var.{0,150}QUESTS_FETCH_QUEST_TO_DELIVER_BEGIN)/,
match: /(?=let.{0,150}QUESTS_FETCH_QUEST_TO_DELIVER_BEGIN)/,
replace: "if($self.shouldPreventFetchingQuests())return;"
}
]
@ -1356,7 +1356,7 @@ export default definePlugin({
// - Also see anywhere DynamicDropdown is used for refactoring.
//
// Various patches to the SearchableSelect component.
find: '"onSearchChange",',
find: ".popoutLayerContext,renderPopout:",
group: true,
replacement: [
{
@ -1386,8 +1386,8 @@ export default definePlugin({
},
{
// Makes use of the custom popoutClassName prop if provided.
match: /(?<=onKeyDown"]\);return.{0,30}?className:\i\(\)\()/,
replace: "arguments[0]?.popoutClassName,"
match: /"aria-busy":!0,className:\i\(\)\(/,
replace: "$&arguments[0]?.popoutClassName,"
},
{
// Passes the custom optionClassName prop to the row renderer.
@ -1411,13 +1411,13 @@ export default definePlugin({
// Formats the Orbs balance on the Quests page with locale string formatting.
find: '("BalanceCounter")',
replacement: {
match: /(?<=\i=>"".concat\(\i).toFixed\(0\)(?=\)\))/,
match: /(?<=`\$\{\i).toFixed\(0\)(?=\}`)/,
replace: ".toLocaleString(undefined,{maximumFractionDigits:0})"
}
},
{
// Adds a maxDigits prop to the LowerBadge component which allows for not truncating, or for truncating at a specific threshold.
find: '"renderBadgeCount"])',
find: ".INTERACTIVE_TEXT_ACTIVE.css,shape",
group: true,
replacement: [
{
@ -1430,17 +1430,17 @@ export default definePlugin({
match: /(children:\i\(\i)/,
replace: "$1,maxDigits"
},
{
// Makes use of the custom prop if provided by using custom logic for negatives and truncation.
// If the prop is not provided, assume default behavior for native badges or other plugins not
// utilizing the custom prop.
match: /function (\i\((\i))\){return (.{0,100}?k\+"\))/,
replace: "function $1,maxDigits){return maxDigits===undefined?($3):$self.formatLowerBadge($2,maxDigits)[0]"
}
// {
// Makes use of the custom prop if provided by using custom logic for negatives and truncation.
// If the prop is not provided, assume default behavior for native badges or other plugins not
// utilizing the custom prop.
// match: /function (\i\((\i))\)\{return (.{0,100}?k\+`)/,
// replace: "function $1,maxDigits){return maxDigits===undefined?($3):$self.formatLowerBadge($2,maxDigits)[0]"
// }
]
},
{
find: "id:\"quest-tile-\".concat",
find: "id:`quest-tile-",
group: true,
replacement: [
{
@ -1481,7 +1481,7 @@ export default definePlugin({
},
{
// Adds the "Questify" sort option to the sort dropdown.
find: '" has no rewards configured"',
find: "has no rewards configured`",
replacement: {
match: /(?=case (\i.\i).SUGGESTED)/,
replace: "case $1.QUESTIFY:return \"Questify\";"
@ -1528,7 +1528,7 @@ export default definePlugin({
},
{
// Set the initial filters.
match: /(get\(\i\)\)\)\?\i:)(\i)/,
match: /(get\(\i\)\)\?\?)(\i)/,
replace: "$1$self.getLastFilterChoices()??$2"
},
{
@ -1616,7 +1616,7 @@ export default definePlugin({
replace: "const questifyText=$self.getQuestUnacceptedButtonText(arguments[0].quest);"
},
{
match: /(?<=}\),)(null==\i\|\|\i\(\))/,
match: /(?<=}\),)(\i\?\.\(\))/,
replace: "!$self.processQuestForAutoComplete(arguments[0].quest)&&($1)"
},
{

View file

@ -133,9 +133,9 @@ export default definePlugin({
authors: [Devs.Samwich],
patches: [
{
find: /\i\.\i\.STICKER_MESSAGE/,
find: ".STICKERS_CONSTANTS_STICKER_DIMENSION)",
replacement: {
match: /}\),\(null!=\i\?\i:(\i)\)\.name]}\);/,
match: /}\),\(\i\?\?\i\)\.name\]\}\);/,
replace: "$& if($self.isBlocked($1.id)) return($self.blockedComponent($1));"
}
}

View file

@ -60,7 +60,7 @@ export default definePlugin({
predicate: () => settings.store.globalMention || settings.store.onlyDMUsers,
},
{
match: /(?<=\i=)\i\.recipients\.map\(.{0,100}:null\}\}\)/,
match: /(?<=\i=)\i\.recipients\.map\(.{0,100}\?\?null\}\)\)/,
replace: "$self.useFilter(true)",
}
],

View file

@ -934,7 +934,7 @@ export default definePlugin({
replace: "const showMeYourNameMention=$self.getMentionNameElement(arguments[0]);$1"
},
{
match: /(?<=onContextMenu:\i\},\i\),{children:)/,
match: /(?<=onContextMenu:\i,\.\.\.\i,children:)/,
replace: "showMeYourNameMention??",
predicate: () => !isPluginEnabled(mentionAvatars.name),
}
@ -985,7 +985,7 @@ export default definePlugin({
// Replace names in reaction tooltips.
find: "reactionTooltip1,",
replacement: {
match: /(\i.\i.getName\((\i),null==(?:.{0,15}?)(\i)\))/,
match: /(\i.\i.getName\((\i),\i\?\.id,(\i)\))/,
replace: "$self.getMemberListProfilesReactionsVoiceNameText({user:$3,guildId:$2,type:\"reactionsTooltip\"})??($1)"
}
},