Skip to content

Commit

Permalink
Fix event name prefix in MJS (missed from last release)
Browse files Browse the repository at this point in the history
  • Loading branch information
replete committed Aug 12, 2024
1 parent 2397132 commit d1ea7ba
Show file tree
Hide file tree
Showing 11 changed files with 43 additions and 53 deletions.
6 changes: 3 additions & 3 deletions __tests__/e2e.tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,9 @@ appVersions.forEach(([filename])=>{

test('should hide UI and save consents correctly after selecting some sections', async () => {
await page.click('button[data-id=settings]')
await page.click('[for=biscuitman_analytics]')
await page.click('[for=biscuitman_functional]')
await page.click('[for=biscuitman_performance]')
await page.click('[for=bm_analytics]')
await page.click('[for=bm_functional]')
await page.click('[for=bm_performance]')

await page.click('button[data-id=save]')

Expand Down
11 changes: 5 additions & 6 deletions dist/biscuitman.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*! biscuitman.js 0.4.0 */
((d, w, O, h, bm)=>{
((d, w, O, h)=>{
const defaults = {
key: 'myconsent',
global: 'Consent',
Expand Down Expand Up @@ -28,7 +28,7 @@
const ui = d.createElement('div');
let dialog;
function render() {
ui.classList.add(bm);
ui.classList.add('biscuitman');
ui.innerHTML = `
<article>
<b>${o.title}</b>
Expand Down Expand Up @@ -60,8 +60,8 @@
<details>
<summary>
<b>${o[`${section}Title`]}</b>
<label for="${bm}_${section}" class="${disabledProp} ${checkedProp}">
<input type="checkbox" id="${bm}_${section}" ${disabledProp} ${checkedProp} data-s="${section}"/>
<label for="bm_${section}" class="${disabledProp} ${checkedProp}">
<input type="checkbox" id="bm_${section}" ${disabledProp} ${checkedProp} data-s="${section}"/>
</label>
<p>${o[`${section}Message`]}</p>
</summary>
Expand Down Expand Up @@ -101,7 +101,6 @@
};
const applyCssClasses = ()=>{
let { consentTime, ...consents } = getConsents();
// if (!consentTime) h.className = h.className.replace(/\bbm-[^\s]+(\s+|$)/g, '').trim();
if (!consentTime) consents = O.fromEntries(o.sections.slice(1).map((sectionName)=>[
sectionName,
false
Expand Down Expand Up @@ -314,4 +313,4 @@
});
openModal();
};
})(document, window, Object, document.documentElement, 'biscuitman');
})(document, window, Object, document.documentElement);
2 changes: 1 addition & 1 deletion dist/biscuitman.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 5 additions & 6 deletions dist/biscuitman.withcss.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*! biscuitman.js 0.4.0 */
((d, w, O, h, bm)=>{
((d, w, O, h)=>{
const defaults = {
key: 'myconsent',
global: 'Consent',
Expand Down Expand Up @@ -28,7 +28,7 @@
const ui = d.createElement('div');
let dialog;
function render() {
ui.classList.add(bm);
ui.classList.add('biscuitman');
ui.innerHTML = `
<article>
<b>${o.title}</b>
Expand Down Expand Up @@ -60,8 +60,8 @@
<details>
<summary>
<b>${o[`${section}Title`]}</b>
<label for="${bm}_${section}" class="${disabledProp} ${checkedProp}">
<input type="checkbox" id="${bm}_${section}" ${disabledProp} ${checkedProp} data-s="${section}"/>
<label for="bm_${section}" class="${disabledProp} ${checkedProp}">
<input type="checkbox" id="bm_${section}" ${disabledProp} ${checkedProp} data-s="${section}"/>
</label>
<p>${o[`${section}Message`]}</p>
</summary>
Expand Down Expand Up @@ -101,7 +101,6 @@
};
const applyCssClasses = ()=>{
let { consentTime, ...consents } = getConsents();
// if (!consentTime) h.className = h.className.replace(/\bbm-[^\s]+(\s+|$)/g, '').trim();
if (!consentTime) consents = O.fromEntries(o.sections.slice(1).map((sectionName)=>[
sectionName,
false
Expand Down Expand Up @@ -314,7 +313,7 @@
});
openModal();
};
})(document, window, Object, document.documentElement, 'biscuitman');
})(document, window, Object, document.documentElement);
;
((d)=>{
let css=d.createElement('style');
Expand Down
Loading

0 comments on commit d1ea7ba

Please sign in to comment.