From 8c1c0384c9154eb9b78218ca8e961fa5003e4111 Mon Sep 17 00:00:00 2001 From: zino Date: Mon, 17 May 2021 21:20:43 +0200 Subject: [PATCH] revised utils deleted old code --- client/src/modules/utils.ts | 69 ------------------------------------- 1 file changed, 69 deletions(-) diff --git a/client/src/modules/utils.ts b/client/src/modules/utils.ts index 2bf375a..9561277 100644 --- a/client/src/modules/utils.ts +++ b/client/src/modules/utils.ts @@ -21,29 +21,6 @@ export default class Utils { loopSearch(); }, inCheckIntervalInMs); } - - // let value: boolean = Utils.querySelector(inSelector); - // console.log(inSelector); - - // if (inSwitch === "selector") - // value = Utils.querySelector(inSelector); - // else if (inSwitch === "function") - // value = Utils.isFunction(inSelector); - // else - // value = false; - - // if (value) { - // console.log("defined"); - // inCallback(); - // } - // else { - // setTimeout(function (): void { - // console.log("repeating"); - // if (inTimeoutInMs && Date.now() - startTimeInMs > inTimeoutInMs) - // return; - // loopSearch(); - // }, inCheckIntervalInMs); - // } })(); } @@ -55,18 +32,6 @@ export default class Utils { static waitForSeatmap(inCallback: Function): void { const seatCharts: CallableFunction = (window).jQuery("#containerSeatmap").seatCharts; this.waitForElement(seatCharts, inCallback, "seatmap"); - // const startTimeInMs: number = Date.now(); - - // if (Utils.isFunction(seatCharts)) - // inCallback(); - // else { - // setTimeout(() => { - // if (inTimeoutInMs && Date.now() - startTimeInMs > inTimeoutInMs) - // return; - - // Utils.waitForSeatmap(inCallback); - // }, inCheckIntervalInMs); - // } } static querySelector(selector: string): boolean { @@ -78,11 +43,6 @@ export default class Utils { static isFunction(inSelector: CallableFunction): boolean { return typeof inSelector === "function" ? true : false; - - // if (typeof inSelector === "function") - // return true; - // else - // return false; } static inject(inContent: string, inType: string = "js", inLoc: string = "head"): void { @@ -121,35 +81,6 @@ export default class Utils { if (script) Utils.appendScript(script, inLoc); - - // if (inType === "js") { - // script = document.createElement('script'); - // script.type = 'text/javascript'; - // script.src = inContent; - // } - // else if (inType === "css") { - // script = document.createElement('link'); - // script.type = 'text/css'; - // (script).rel = "stylesheet"; - // (script).href = inContent; - // } - // else if (inType === "cssCustom") { - // script = document.createElement('style'); - // script.type = 'text/css'; - // script.innerHTML = inContent; - // } - // else if (inType === "script") { - // script = document.createElement('script'); - // script.type = 'text/javascript'; - // script.innerHTML = inContent; - // } - // else - // return; - - // if (inLoc === "body") - // document.body.appendChild(script); - // else if (inLoc === "head") - // document.head.appendChild(script); } static appendScript(inScript: I.TypeInjectScript, inLoc: string): void {