Add FeatureGates

This commit is contained in:
redphx
2024-06-09 18:31:15 +07:00
parent 902918d7fb
commit ebb4d3c141
5 changed files with 32 additions and 16 deletions

View File

@@ -8,6 +8,7 @@ type BxFlags = Partial<{
UseDevTouchLayout: boolean;
ForceNativeMkbTitles: string[];
FeatureGates: {[key: string]: boolean} | null,
}>
// Setup flags
@@ -21,9 +22,10 @@ const DEFAULT_FLAGS: BxFlags = {
UseDevTouchLayout: false,
ForceNativeMkbTitles: [],
FeatureGates: null,
}
export const BX_FLAGS = Object.assign(DEFAULT_FLAGS, window.BX_FLAGS || {});
export const BX_FLAGS: BxFlags = Object.assign(DEFAULT_FLAGS, window.BX_FLAGS || {});
try {
delete window.BX_FLAGS;
} catch (e) {}