Skip to content

Commit 47d7b0c

Browse files
rofeclaude
andcommitted
feat(lib): update scripts/aem.js to aem.js@3.1.2
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent d17525a commit 47d7b0c

1 file changed

Lines changed: 5 additions & 19 deletions

File tree

scripts/aem.js

Lines changed: 5 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -93,14 +93,18 @@ function sampleRUM(checkpoint, data) {
9393
sampleRUM.baseURL = sampleRUM.baseURL || new URL(window.RUM_BASE || '/', new URL('https://ot.aem.live'));
9494
sampleRUM.collectBaseURL = sampleRUM.collectBaseURL || sampleRUM.baseURL;
9595
sampleRUM.sendPing = (ck, time, pingData = {}) => {
96+
const uaExtra = navigator.webdriver && !navigator.userAgent.includes('+http')
97+
? { ua: `${navigator.userAgent} +http://navigator.webdriver` }
98+
: {};
9699
// eslint-disable-next-line max-len, object-curly-newline
97100
const rumData = JSON.stringify({
98101
weight,
99102
id,
100-
referer: window.location.href,
103+
referer: window.location.origin + window.location.pathname,
101104
checkpoint: ck,
102105
t: time,
103106
...pingData,
107+
...uaExtra,
104108
});
105109
const urlParams = window.RUM_PARAMS
106110
? new URLSearchParams(window.RUM_PARAMS).toString() || ''
@@ -471,24 +475,6 @@ function decorateSections(main) {
471475
section.classList.add('section');
472476
section.dataset.sectionStatus = 'initialized';
473477
section.style.display = 'none';
474-
475-
// Process section metadata
476-
const sectionMeta = section.querySelector('div.section-metadata');
477-
if (sectionMeta) {
478-
const meta = readBlockConfig(sectionMeta);
479-
Object.keys(meta).forEach((key) => {
480-
if (key === 'style') {
481-
const styles = meta.style
482-
.split(',')
483-
.filter((style) => style)
484-
.map((style) => toClassName(style.trim()));
485-
styles.forEach((style) => section.classList.add(style));
486-
} else {
487-
section.dataset[toCamelCase(key)] = meta[key];
488-
}
489-
});
490-
sectionMeta.parentNode.remove();
491-
}
492478
});
493479
}
494480

0 commit comments

Comments
 (0)