From 7a4fe1d14db50e1b17f7acc2f532884117ed76d0 Mon Sep 17 00:00:00 2001 From: Miodec Date: Mon, 6 Mar 2023 18:45:43 +0100 Subject: [PATCH] console logging choice --- frontend/src/ts/controllers/ad-controller.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/frontend/src/ts/controllers/ad-controller.ts b/frontend/src/ts/controllers/ad-controller.ts index eb8ac0a27..723811eb1 100644 --- a/frontend/src/ts/controllers/ad-controller.ts +++ b/frontend/src/ts/controllers/ad-controller.ts @@ -18,14 +18,18 @@ let initialised = false; export let adBlock: boolean; export let cookieBlocker: boolean; -// const choice: "eg" | "pw" = Math.random() < 0.5 ? "eg" : "pw"; -let choice: "eg" | "pw" = "eg"; +let choice: "eg" | "pw" = Math.random() < 0.5 ? "eg" : "pw"; +// let choice: "eg" | "pw" = "eg"; + +console.log("AB choice: " + choice); const adChoiceForce = window.localStorage.getItem("adChoiceForce"); if (adChoiceForce === "eg") { choice = "eg"; + console.log("AB choice forced: " + choice); } else if (adChoiceForce === "pw") { choice = "pw"; + console.log("AB choice forced: " + choice); } export function init(): void {