From 74c38146d5f186b242d6fc51c6287a472ba5576b Mon Sep 17 00:00:00 2001 From: Nuckyz <61953774+Nuckyz@users.noreply.github.com> Date: Thu, 28 Mar 2024 10:17:05 -0300 Subject: [PATCH] Fix BetterSettings patches (#2307) --- src/plugins/betterSettings/index.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/plugins/betterSettings/index.tsx b/src/plugins/betterSettings/index.tsx index 6d3c8798e..7d81c6f5c 100644 --- a/src/plugins/betterSettings/index.tsx +++ b/src/plugins/betterSettings/index.tsx @@ -82,7 +82,7 @@ export default definePlugin({ find: "this.renderArtisanalHack()", replacement: [ { // Fade in on layer - match: /(?<=(\i)\.contextType=\i\.AccessibilityPreferencesContext;)/, + match: /(?<=\((\i),"contextType",\i\.AccessibilityPreferencesContext\);)/, replace: "$1=$self.Layer;", predicate: () => settings.store.disableFade }, @@ -107,11 +107,11 @@ export default definePlugin({ ], predicate: () => settings.store.disableFade }, - { // Load menu stuff on hover, not on click + { // Load menu TOC eagerly find: "Messages.USER_SETTINGS_WITH_BUILD_OVERRIDE.format", replacement: { - match: /(?<=handleOpenSettingsContextMenu.{0,250}?\i\.el\(("[^"]+")\)\.then\([^;]*?("\d+").*?Messages\.USER_SETTINGS,)(?=onClick:)/, - replace: "onMouseEnter(){Vencord.Webpack.wreq.el($1).then(()=>Vencord.Webpack.wreq($2));}," + match: /(?<=(\i)\(this,"handleOpenSettingsContextMenu",.{0,100}?openContextMenuLazy.{0,100}?(await Promise\.all[^};]*?\)\)).*?,)(?=\1\(this)/, + replace: "(async ()=>$2)()," }, predicate: () => settings.store.eagerLoad },