From e652044d200bd28b1a6fb214f2a8f33797471238 Mon Sep 17 00:00:00 2001 From: 1024x2 <2pow11@gmail.com> Date: Thu, 26 Oct 2023 00:48:25 +0100 Subject: [PATCH 3/5] Experiments: Re-add staging banner (it's funny) --- src/plugins/experiments/index.tsx | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/plugins/experiments/index.tsx b/src/plugins/experiments/index.tsx index f8ea4b0..dc4f78f 100644 --- a/src/plugins/experiments/index.tsx +++ b/src/plugins/experiments/index.tsx @@ -33,6 +33,12 @@ 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 } }); @@ -77,6 +83,14 @@ export default definePlugin({ } ] }, + { + find: ".Messages.DEV_NOTICE_STAGING", + predicate: () => settings.store.forceStagingBanner, + replacement: { + match: /window\.GLOBAL_ENV\.RELEASE_CHANNEL/, + replace: "\"staging\"" + } + }, { find: 'H1,title:"Experiments"', replacement: { -- 2.43.1