1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
From c32eb6e5c967f10f09b5b5952b924202b49b2929 Mon Sep 17 00:00:00 2001
From: 1024x2 <2pow11@gmail.com>
Date: Thu, 26 Oct 2023 00:48:25 +0100
Subject: [PATCH 3/6] 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 3446388..7902f3e 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.44.0
|