From 0b0c4df5449576187767f55184598138f04661e6 Mon Sep 17 00:00:00 2001 From: turtledreams <62231246+turtledreams@users.noreply.github.com> Date: Mon, 9 Dec 2024 23:18:38 +0900 Subject: [PATCH] timer --- modules/CountlyClass.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/modules/CountlyClass.js b/modules/CountlyClass.js index 84d35b6..59db5f6 100644 --- a/modules/CountlyClass.js +++ b/modules/CountlyClass.js @@ -91,6 +91,7 @@ class CountlyClass { #contentEndPoint; #inContentZone; #contentZoneTimer; + #contentZoneTimerInterval; #contentIframeID; constructor(ob) { this.#self = this; @@ -216,6 +217,11 @@ constructor(ob) { this.hcWarningCount = this.#getValueFromStorage(healthCheckCounterEnum.warningCount) || 0; this.hcStatusCode = this.#getValueFromStorage(healthCheckCounterEnum.statusCode) || -1; this.hcErrorMessage = this.#getValueFromStorage(healthCheckCounterEnum.errorMessage) || ""; + this.#contentZoneTimerInterval = getConfig("content_zone_timer_interval", ob, null); + + if (this.#contentZoneTimerInterval) { + this.#contentTimeInterval = Math.max(this.#contentZoneTimerInterval, 15) * 1000; + } if (this.#maxCrashLogs && !this.maxBreadcrumbCount) { this.maxBreadcrumbCount = this.#maxCrashLogs; @@ -419,6 +425,9 @@ constructor(ob) { if (this.#remoteConfigs) { this.#log(logLevelEnums.DEBUG, "initialize, stored remote configs:[" + JSON.stringify(this.#remoteConfigs) + "]"); } + if (this.#contentZoneTimerInterval) { + this.#log(logLevelEnums.DEBUG, "initialize, content_zone_timer_interval:[" + this.#contentZoneTimerInterval + "]"); + } // functions, if provided, would be printed as true without revealing their content this.#log(logLevelEnums.DEBUG, "initialize, 'getViewName' callback override provided:[" + (this.getViewName !== Countly.getViewName) + "]"); this.#log(logLevelEnums.DEBUG, "initialize, 'getSearchQuery' callback override provided:[" + (this.getSearchQuery !== Countly.getSearchQuery) + "]");