From 0ad41c4d7014876a60f7e28e07269dc696adb2f1 Mon Sep 17 00:00:00 2001 From: ischanx Date: Sat, 24 Sep 2022 15:12:27 +0800 Subject: [PATCH] feat: fg --- html/fg.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 html/fg.js diff --git a/html/fg.js b/html/fg.js new file mode 100644 index 0000000..55c8dd2 --- /dev/null +++ b/html/fg.js @@ -0,0 +1,17 @@ +const defaultConfig = { + SENTRY_ENABLE: true, +}; + +window.__FG__ = defaultConfig; + +window.getFGConfig = function (user) { + const { id } = user; + const internalUsers = []; + const isInternal = internalUsers.includes(id); + if (isInternal) { + const internalConfig = { + ANYVIEW_DEVELOPER: true, + }; + window.__FG__ = Object.assign(window.__FG__, internalConfig); + } +};