Fix Our Broken Patches

This commit is contained in:
thororen1234 2024-08-21 21:53:50 -04:00
parent cebb70b9ba
commit 9ac31fa936
2 changed files with 5 additions and 5 deletions

View file

@ -87,7 +87,7 @@ export default definePlugin({
{ // Gift button
find: 'Messages.PREMIUM_GIFT_BUTTON_LABEL,"aria-haspopup":"dialog",onClick:',
replacement: {
match: /if\(\w+\)return null;/,
match: /if\(\i\)return null;/,
replace: "return null;",
},
predicate: () => settings.store.gift,
@ -95,7 +95,7 @@ export default definePlugin({
{ // Emoji list
find: "Messages.EMOJI_PICKER_CREATE_EMOJI_TITLE,size:",
replacement: {
match: /(\w+)=!\w+&&\w+.\i.isEmojiCategoryNitroLocked\(\{[^}]*\}\);/,
match: /(\i)=\i\|\|!\i&&\i.\i\i.isEmojiCategoryNitroLocked\(\{[^}]*\}\);/,
replace: "$&$1||"
},
predicate: () => settings.store.emojiList,

View file

@ -91,7 +91,7 @@ export default definePlugin({
{
find: "this.renderArtisanalHack()",
replacement: {
match: /createPromise:\(\)=>([^:}]*?),webpackId:"\d+",name:(?!="CollectiblesShop")"[^"]+"/g,
match: /createPromise:\(\)=>([^:}]*?),webpackId:"?\d+"?,name:(?!="CollectiblesShop")"[^"]+"/g,
replace: "$&,_:$1",
predicate: () => true
}
@ -100,8 +100,8 @@ export default definePlugin({
{
find: "Messages.USER_SETTINGS_WITH_BUILD_OVERRIDE.format",
replacement: {
match: /(?<=(\i)\(this,"handleOpenSettingsContextMenu",.{0,100}?openContextMenuLazy.{0,100}?(await Promise\.all[^};]*?\)\)).*?,)(?=\1\(this)/,
replace: "(async ()=>$2)(),"
match: /(\i)\(this,"handleOpenSettingsContextMenu",.{0,100}?null!=\i&&.{0,100}?(await Promise\.all[^};]*?\)\)).*?,(?=\1\(this)/,
replace: "$&(async ()=>$2)(),"
},
predicate: () => true
},