Make module definitions consistent

This commit is contained in:
2025-04-03 07:42:09 -04:00
parent ca3f9970a9
commit 89870edaaf
2 changed files with 97 additions and 93 deletions

View File

@@ -95,7 +95,8 @@ const calculateStickyPosition = (s) => {
} }
} }
export function init(p = document){ module.exports = {
init: (p = document) => {
font.size = parseFloat(getComputedStyle(document.documentElement).fontSize.replace("px","")); font.size = parseFloat(getComputedStyle(document.documentElement).fontSize.replace("px",""));
p.querySelectorAll("sticky-note").forEach((s) => { p.querySelectorAll("sticky-note").forEach((s) => {
@@ -128,4 +129,5 @@ export function init(p = document){
calculateStickyPosition(s); calculateStickyPosition(s);
}); });
} }
}
} }

View File

@@ -31,7 +31,8 @@ const waitForElement = (selector) => {
} }
export function init(container = document, spacer = true, args = {}) { module.exports = {
init: (container = document, spacer = true, args = {}) => {
container.querySelectorAll(".tab-group, tabset").forEach(tabGroup => { container.querySelectorAll(".tab-group, tabset").forEach(tabGroup => {
@@ -103,4 +104,5 @@ export function init(container = document, spacer = true, args = {}) {
} }
}); });
}
} }