Skip to content

Commit

Permalink
Make CSS state classes show by default
Browse files Browse the repository at this point in the history
  • Loading branch information
replete committed Jun 23, 2024
1 parent 2a318fb commit 1e030fd
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 4 deletions.
5 changes: 3 additions & 2 deletions biscuitman.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,9 @@
const displayUI = (show) => ui.classList.toggle('bm-hide', !show)

const applyCssClasses = () => {
const { consentTime, ...consents} = getConsents()
if (!consentTime) h.className = h.className.replace(/\bbm-[^\s]+(\s+|$)/g, '').trim();
let { consentTime, ...consents } = getConsents()
// if (!consentTime) h.className = h.className.replace(/\bbm-[^\s]+(\s+|$)/g, '').trim();
if (!consentTime) consents = Object.fromEntries(o.sections.slice(1).map(sectionName => [sectionName, false]));

for (let [name, granted] of Object.entries(consents)) {
h.classList.toggle(`bm-${name}`, granted)
Expand Down
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.

Loading

0 comments on commit 1e030fd

Please sign in to comment.