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 4373ab5
Show file tree
Hide file tree
Showing 14 changed files with 52 additions and 62 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
2 changes: 1 addition & 1 deletion dist/biscuitman.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! biscuitman.js 0.4.0 */
/*! biscuitman.js 0.4.1 */
.biscuitman {
--ui: 0, 0, 0;
--tx: #444;
Expand Down
13 changes: 6 additions & 7 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)=>{
/*! biscuitman.js 0.4.1 */
((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.css

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

Loading

0 comments on commit 4373ab5

Please sign in to comment.