mirror of
https://github.com/Kornstalx/5etools-mirror-2.github.io.git
synced 2025-10-28 20:45:35 -05:00
v1.208.0
This commit is contained in:
@@ -15,7 +15,7 @@ class NavBar {
|
||||
|
||||
static _onLoad () {
|
||||
NavBar._dropdowns = [...NavBar._navbar.querySelectorAll(`li.dropdown--navbar`)];
|
||||
document.addEventListener("click", () => NavBar._dropdowns.forEach(ele => ele.classList.remove("open")));
|
||||
document.addEventListener("click", () => NavBar._closeAllDropdowns());
|
||||
|
||||
NavBar._clearAllTimers();
|
||||
|
||||
@@ -123,19 +123,11 @@ class NavBar {
|
||||
this._addElement_button(
|
||||
NavBar._CAT_SETTINGS,
|
||||
{
|
||||
html: styleSwitcher.getDayNightButtonText(),
|
||||
click: (evt) => NavBar.InteractionManager._onClick_button_dayNight(evt),
|
||||
context: (evt) => NavBar.InteractionManager._onContext_button_dayNight(evt),
|
||||
className: "nightModeToggle",
|
||||
},
|
||||
);
|
||||
this._addElement_button(
|
||||
NavBar._CAT_SETTINGS,
|
||||
{
|
||||
html: styleSwitcher.getActiveWide() === true ? "Disable Wide Mode" : "Enable Wide Mode (Experimental)",
|
||||
click: (evt) => NavBar.InteractionManager._onClick_button_wideMode(evt),
|
||||
className: "wideModeToggle",
|
||||
title: "This feature is unsupported. Expect bugs.",
|
||||
html: "Preferences",
|
||||
click: () => {
|
||||
ConfigUi.show();
|
||||
NavBar._closeAllDropdowns();
|
||||
},
|
||||
},
|
||||
);
|
||||
this._addElement_divider(NavBar._CAT_SETTINGS);
|
||||
@@ -395,7 +387,7 @@ class NavBar {
|
||||
a.setAttribute("target", "_blank");
|
||||
a.classList.add("inline-split-v-center");
|
||||
a.classList.add("w-100");
|
||||
a.innerHTML = `<span>${aText}</span><span class="glyphicon glyphicon-new-window"/>`;
|
||||
a.innerHTML = `<span>${aText}</span><span class="glyphicon glyphicon-new-window"></span>`;
|
||||
}
|
||||
|
||||
li.appendChild(a);
|
||||
@@ -618,6 +610,10 @@ class NavBar {
|
||||
else NavBar._openDropdown(ele);
|
||||
}
|
||||
|
||||
static _closeAllDropdowns () {
|
||||
NavBar._dropdowns.forEach(ele => ele.classList.remove("open"));
|
||||
}
|
||||
|
||||
static _openDropdown (ele) {
|
||||
const lisOpen = [];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user