diff options
author | Vendicated <vendicated@riseup.net> | 2023-10-07 23:00:44 +0200 |
---|---|---|
committer | Vendicated <vendicated@riseup.net> | 2023-10-07 23:00:44 +0200 |
commit | ac1b67ccbdf0f46fe9d18a0a5ef4145d494b879f (patch) | |
tree | da8e6df4fa407e46aa27770a6fe3a91d71974aa1 | |
parent | c0f2c974587d75a38e3e753368ef0e2e2be139fd (diff) | |
download | Vencord-ac1b67ccbdf0f46fe9d18a0a5ef4145d494b879f.tar.gz Vencord-ac1b67ccbdf0f46fe9d18a0a5ef4145d494b879f.tar.bz2 Vencord-ac1b67ccbdf0f46fe9d18a0a5ef4145d494b879f.zip |
Experiments(isStaff): Fix search history not showing
-rw-r--r-- | src/plugins/experiments/index.tsx | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/src/plugins/experiments/index.tsx b/src/plugins/experiments/index.tsx index d38687f..cf5f4e6 100644 --- a/src/plugins/experiments/index.tsx +++ b/src/plugins/experiments/index.tsx @@ -33,12 +33,6 @@ const settings = definePluginSettings({ type: OptionType.BOOLEAN, default: false, restartNeeded: true - }, - forceStagingBanner: { - description: "Whether to force Staging banner under user area.", - type: OptionType.BOOLEAN, - default: false, - restartNeeded: true } }); @@ -83,12 +77,13 @@ export default definePlugin({ } ] }, + // Fix search history being disabled / broken with isStaff { - find: ".Messages.DEV_NOTICE_STAGING", - predicate: () => settings.store.forceStagingBanner, + find: 'get("disable_new_search")', + predicate: () => settings.store.enableIsStaff, replacement: { - match: /"staging"===window\.GLOBAL_ENV\.RELEASE_CHANNEL/, - replace: "true" + match: /(?<=showNewSearch"\);return)\s?!/, + replace: "!1&&!" } }, { |