Fixes #11 Second Parameter to false will not add spacer li

This commit is contained in:
2024-09-03 17:55:37 -04:00
parent 2c117442af
commit c201ff8f63
5 changed files with 57 additions and 22 deletions

View File

@@ -178,9 +178,9 @@ module.exports = {
})
}
},
getCSS: (el, prop, b = false) {
return window.getComputedStyle(el, null).getPropertyValue(prop);
},
// getCSS: (el, prop, b = false) {
// return window.getComputedStyle(el, null).getPropertyValue(prop);
// },
init: (args = {}) => {
const url = getURLVars();
font.size = parseFloat(getComputedStyle(document.documentElement).fontSize.replace("px",""));

View File

@@ -24,9 +24,6 @@ core.init({
}
});
// deprecated switch handler
const flipInfoSwitch = (e, s = e.currentTarget) => {

View File

@@ -9,7 +9,7 @@ const click = new MouseEvent('click', {
cancelable: true
});
export function init(p = document) {
export function init(p = document, s = true) {
p.querySelectorAll(".tab-group, tabset").forEach(tabGroup => {
if (tabGroup.querySelector("[role=tablist]") === null) {
@@ -36,7 +36,7 @@ export function init(p = document) {
const ul = document.createElement('ul');
ul.setAttribute("role", "tablist");
ul.innerHTML = `${tablist}<li role="separator" class="separator"></li>`;
ul.innerHTML = s != true ? `${tablist}` : `${tablist}<li role="separator" class="separator"></li>`;
tabGroup.insertBefore(ul, tabGroup.firstChild);
tabGroup.querySelectorAll('[role="tab"]').forEach(tab => {