Experiments(isStaff): Fix search history not showing
This commit is contained in:
parent
c0f2c97458
commit
ac1b67ccbd
|
@ -33,12 +33,6 @@ const settings = definePluginSettings({
|
||||||
type: OptionType.BOOLEAN,
|
type: OptionType.BOOLEAN,
|
||||||
default: false,
|
default: false,
|
||||||
restartNeeded: true
|
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",
|
find: 'get("disable_new_search")',
|
||||||
predicate: () => settings.store.forceStagingBanner,
|
predicate: () => settings.store.enableIsStaff,
|
||||||
replacement: {
|
replacement: {
|
||||||
match: /"staging"===window\.GLOBAL_ENV\.RELEASE_CHANNEL/,
|
match: /(?<=showNewSearch"\);return)\s?!/,
|
||||||
replace: "true"
|
replace: "!1&&!"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue