- Drop FA4 font files and font-awesome.min.css. - Ship FA6 webfonts (solid, regular, brands) and fa6.min.css. - io-indicator: use FA6 names (fa-circle-plus / -minus / -exclamation). - static/js/ui.js: no-op the legacy side-menu click handler when menu links are not present (V09 chrome removes them) so the Settings tab no longer logs 'cannot set properties of null'.
38 lines
1.2 KiB
JavaScript
38 lines
1.2 KiB
JavaScript
// V09 redesign: the legacy side menu was removed. Keep this file
|
|
// shipped in case anything still references it, but no-op the click
|
|
// handler that used to wire up the burger menu so it does not throw
|
|
// "Cannot set properties of null" on the Settings tab.
|
|
(function (window, document) {
|
|
var menuLink = document.getElementById("menuLink");
|
|
if (!menuLink) {
|
|
return;
|
|
}
|
|
|
|
var layout = document.getElementById("layout");
|
|
var menu = document.getElementById("menu");
|
|
|
|
function toggleClass(element, className) {
|
|
if (!element) return;
|
|
var classes = element.className.split(/\s+/);
|
|
var i;
|
|
for (i = 0; i < classes.length; i++) {
|
|
if (classes[i] === className) {
|
|
classes.splice(i, 1);
|
|
break;
|
|
}
|
|
}
|
|
if (i === classes.length) {
|
|
classes.push(className);
|
|
}
|
|
element.className = classes.join(" ");
|
|
}
|
|
|
|
menuLink.onclick = function (e) {
|
|
var active = "active";
|
|
e.preventDefault();
|
|
toggleClass(layout, active);
|
|
toggleClass(menu, active);
|
|
toggleClass(menuLink, active);
|
|
};
|
|
}(this, this.document));
|