From 7d6d32144177ce8c516092a114435988864ff6fa Mon Sep 17 00:00:00 2001 From: supahgreg Date: Mon, 13 Oct 2025 02:54:36 +0000 Subject: Address remaining ESLint 'no-undef' and 'no-unused-vars' occurrences. * https://eslint.org/docs/latest/rules/no-undef * https://eslint.org/docs/latest/rules/no-unused-vars --- js/utility.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'js/utility.js') diff --git a/js/utility.js b/js/utility.js index e5de5f300..0a9b59454 100644 --- a/js/utility.js +++ b/js/utility.js @@ -7,6 +7,7 @@ window.addEventListener("load", function() { apply_night_mode: function (is_night, link) { console.log("night mode changed to", is_night); + /* global __default_dark_theme, __default_light_theme */ const light_theme = typeof __default_light_theme !== 'undefined' ? __default_light_theme : 'themes/light.css'; const dark_theme = typeof __default_dark_theme !== 'undefined' ? __default_dark_theme : 'themes/night.css'; @@ -35,7 +36,7 @@ window.addEventListener("load", function() { mql.addEventListener("change", () => { UtilityJS.apply_night_mode(mql.matches, link); }); - } catch (e) { + } catch { console.warn("exception while trying to set MQL event listener"); } -- cgit v1.2.3-54-g00ecf