From bf7b9e6112f34a31053892799c1f081ce57d33be Mon Sep 17 00:00:00 2001 From: Andreas Haller Date: Fri, 25 Oct 2024 08:34:53 +0200 Subject: [PATCH 1/2] Remove obsolete LiveUX. --- scripts/delayed.js | 6 ------ 1 file changed, 6 deletions(-) diff --git a/scripts/delayed.js b/scripts/delayed.js index b1adb4dc..4b0a47e7 100644 --- a/scripts/delayed.js +++ b/scripts/delayed.js @@ -47,11 +47,6 @@ function loadLaunch() { injectScript(src); } -function loadLiveUXRUM() { - const src = 'https://liveux.cnwebperformance.biz/collector/collector.min.js?id=webperf-netcentric'; - injectScript(src, 'anonymous'); -} - function loadSidekickExtension() { injectScript('/scripts/sidekick.js'); } @@ -84,7 +79,6 @@ class ScrollIndicator { decorateTwitterFeed(); loadLaunch(); -loadLiveUXRUM(); loadSidekickExtension(); if (document.body.classList.contains('blogpost')) { From 5251a274e91b712caafc3bb46e122985f7102ca8 Mon Sep 17 00:00:00 2001 From: Andreas Haller Date: Fri, 25 Oct 2024 08:42:50 +0200 Subject: [PATCH 2/2] update hlx.page references --- .github/pull_request_template.md | 4 ++-- README.md | 8 ++++---- plugins/experimentation/README.md | 2 +- plugins/experimentation/src/index.js | 2 +- scripts/lib-franklin.js | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 267ad063..10a99cca 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -3,5 +3,5 @@ Please always provide the [GitHub issue(s)](../issues) your PR is for, as well a Fix # Test URLs: -- Before: https://main--cn-website--netcentric.hlx.page/ -- After: https://--cn-website--netcentric.hlx.page/ +- Before: https://main--cn-website--netcentric.aem.live/ +- After: https://--cn-website--netcentric.aem.live/ diff --git a/README.md b/README.md index 706acd2b..5e989705 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,8 @@ Relaunch of the [netcentric.biz](https://www.netcentric.biz) website. ## Environments -- Preview: https://main--cn-website--netcentric.hlx.page -- Live: https://main--cn-website--netcentric.hlx.live/ +- Preview: https://main--cn-website--netcentric.aem.page +- Live: https://main--cn-website--netcentric.aem.live ## Installation @@ -20,6 +20,6 @@ npm tst ## Local development 1. Clone this repository -1. Install the [Helix CLI](https://github.com/adobe/helix-cli): `npm install -g @adobe/helix-cli` -1. Start Helix Pages Proxy: `hlx up` (opens your browser at `http://localhost:3000`) +1. Install the [AEM CLI](https://github.com/adobe/helix-cli): `npm install -g @adobe/aem-cli` +1. Start AEM Pages Proxy, execute while being in `cn-website`: `aem up` (opens your browser at `http://localhost:3000`) 1. Open the `cn-website` directory in your favorite IDE and start coding :) diff --git a/plugins/experimentation/README.md b/plugins/experimentation/README.md index add8c94d..d6227a81 100644 --- a/plugins/experimentation/README.md +++ b/plugins/experimentation/README.md @@ -141,7 +141,7 @@ runEager.call(document, { // (prod environments do not get the pill overlay) prodHost: 'www.my-website.com', // if you have several, or need more complex logic to toggle pill overlay, you can use - isProd: () => window.location.hostname.endsWith('hlx.page') + isProd: () => window.location.hostname.endsWith('aem.page') || window.location.hostname === ('localhost'), /* Generic properties */ diff --git a/plugins/experimentation/src/index.js b/plugins/experimentation/src/index.js index df42ae98..3c4fae99 100644 --- a/plugins/experimentation/src/index.js +++ b/plugins/experimentation/src/index.js @@ -678,7 +678,7 @@ export async function loadLazy(document, options, context) { ...DEFAULT_OPTIONS, ...(options || {}), }; - if (window.location.hostname.endsWith('hlx.page') + if (window.location.hostname.endsWith('aem.page') || window.location.hostname === ('localhost') || (typeof options.isProd === 'function' && !options.isProd()) || (options.prodHost && options.prodHost !== window.location.origin)) { diff --git a/scripts/lib-franklin.js b/scripts/lib-franklin.js index 09a2a28d..989789c2 100644 --- a/scripts/lib-franklin.js +++ b/scripts/lib-franklin.js @@ -51,7 +51,7 @@ export function sampleRUM(checkpoint, data = {}) { const sendPing = (pdata = data) => { // eslint-disable-next-line object-curly-newline, max-len, no-use-before-define const body = JSON.stringify({ weight, id, referer: window.location.href, generation: window.hlx.RUM_GENERATION, checkpoint, ...data }); - const url = `https://rum.hlx.page/.rum/${weight}`; + const url = `https://rum.aem.page/.rum/${weight}`; // eslint-disable-next-line no-unused-expressions navigator.sendBeacon(url, body); // eslint-disable-next-line no-console @@ -62,7 +62,7 @@ export function sampleRUM(checkpoint, data = {}) { lazy: () => { // use classic script to avoid CORS issues const script = document.createElement('script'); - script.src = 'https://rum.hlx.page/.rum/@adobe/helix-rum-enhancer@^1/src/index.js'; + script.src = 'https://rum.aem.page/.rum/@adobe/helix-rum-enhancer@^1/src/index.js'; document.head.appendChild(script); return true; },