Skip to content

Commit d2c8865

Browse files
committed
- Removed console.log statements from delayed.js, env.js, commerce.js and scripts.js
1 parent 63f071a commit d2c8865

4 files changed

Lines changed: 0 additions & 20 deletions

File tree

scripts/commerce.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,6 @@ export function getOptionsUIDsFromUrl() {
251251
}
252252

253253
export async function trackHistory() {
254-
console.log('trackHistory');
255254
if (!getConsent('commerce-recommendations')) {
256255
return;
257256
}

scripts/delayed.js

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,33 +11,26 @@ import { EXPERIENCE_PLATFORM_WEB_SDK_PROD, EXPERIENCE_PLATFORM_WEB_SDK_STAGE } f
1111
* Currently stage only; prod injection is disabled below.
1212
*/
1313
function injectExperiencePlatformWebSDK() {
14-
console.log('injectExperiencePlatformWebSDK');
1514
const head = document.head || document.documentElement;
16-
console.log('head', head);
1715
if (!head) return;
1816

1917
const alreadyInjected = [...head.querySelectorAll('script[src]')].some(
2018
(s) => s.src === EXPERIENCE_PLATFORM_WEB_SDK_PROD || s.src === EXPERIENCE_PLATFORM_WEB_SDK_STAGE,
2119
);
22-
console.log('alreadyInjected', alreadyInjected);
2320
if (alreadyInjected) return;
2421

2522
// TODO: Enable Web SDK in prod — remove the next line and use the conditional below for script.src.
26-
console.log('isProd(experimentationConfig)', isProd(experimentationConfig));
2723
if (isProd(experimentationConfig)) return;
2824
const script = document.createElement('script');
2925

3026
// script.src = isProd(experimentationConfig) ? EXPERIENCE_PLATFORM_WEB_SDK_PROD : EXPERIENCE_PLATFORM_WEB_SDK_STAGE;
3127
script.src = EXPERIENCE_PLATFORM_WEB_SDK_STAGE;
3228

3329
script.async = true;
34-
console.log('script', script);
3530
head.appendChild(script);
36-
console.log('script appended');
3731
}
3832

3933
async function initAnalytics() {
40-
console.log('initAnalytics');
4134
try {
4235
injectExperiencePlatformWebSDK();
4336
} catch (error) {
@@ -106,9 +99,3 @@ if (map) {
10699

107100
document.dispatchEvent(new Event('delayed-phase'));
108101
Window.DELAYED_PHASE = true;
109-
110-
const testLoad = () => {
111-
console.log('testLoad');
112-
}
113-
114-
testLoad();

scripts/env.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,8 @@
77

88
export const isProd = (config) => {
99
if (config?.prodHost) {
10-
console.log('config.prodHost', config.prodHost);
11-
console.log('window.location.hostname', window.location.hostname);
1210
return window.location.hostname === config.prodHost;
1311
}
14-
console.log('window.location.hostname.endsWith("hlx.page")', window.location.hostname.endsWith('hlx.page'));
15-
console.log('window.location.hostname !== "localhost"', window.location.hostname !== 'localhost');
1612
return !window.location.hostname.endsWith('hlx.page') && window.location.hostname !== 'localhost';
1713
};
1814

scripts/scripts.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -445,12 +445,10 @@ export function getConsent(topic) {
445445
}
446446

447447
async function loadPage() {
448-
console.log('loadPage');
449448
await initializeConfig();
450449
await loadEager(document);
451450
await loadLazy(document);
452451
loadDelayed();
453-
console.log('loadPage complete');
454452
}
455453

456454
loadPage();

0 commit comments

Comments
 (0)