summaryrefslogtreecommitdiff
path: root/js/utility.js
diff options
context:
space:
mode:
authorGreg <supahgreg@users.noreply.github.com>2025-10-13 23:39:24 -0500
committerGitHub <noreply@github.com>2025-10-13 23:39:24 -0500
commit6505cbb592b91556ca25a2bf72ad1d8cb0b3bc2a (patch)
tree8ab133cc17a329ef7d99d152b3f6b4edc3830509 /js/utility.js
parent0d2b1d601294802286aa26e5486c1c4fee92c05a (diff)
parent8b46ab31a96b6b6129f624719ac33ddf761805f1 (diff)
Merge pull request #42 from tt-rss/bugfix/eslint-config-and-findings
Get ESLint 9.x working, make the new config stricter, address findings
Diffstat (limited to 'js/utility.js')
-rw-r--r--js/utility.js9
1 files changed, 5 insertions, 4 deletions
diff --git a/js/utility.js b/js/utility.js
index 2e27c4fe6..0a9b59454 100644
--- a/js/utility.js
+++ b/js/utility.js
@@ -7,8 +7,9 @@ window.addEventListener("load", function() {
apply_night_mode: function (is_night, link) {
console.log("night mode changed to", is_night);
- 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';
+ /* 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';
if (link) {
const css_override = is_night ? dark_theme : light_theme;
@@ -27,7 +28,7 @@ window.addEventListener("load", function() {
link.onload = function() {
document.querySelector("body").removeClassName("css_loading");
- if (typeof UtilityApp != "undefined")
+ if (typeof UtilityApp !== "undefined")
UtilityApp.init();
};
@@ -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");
}