summaryrefslogtreecommitdiff
path: root/js/utility.js
diff options
context:
space:
mode:
authorAndrew Dolgov <fox@fakecake.org>2025-08-04 20:09:08 +0300
committerAndrew Dolgov <fox@fakecake.org>2025-08-04 20:09:08 +0300
commit906063b1d118fb8c94299fc1f23135519bf8a47f (patch)
treea35399d82497cbc965e9ab71871eda3b801b58f7 /js/utility.js
parent851ddf4bbe750e30816b6c494165e9860bd39b92 (diff)
parent19fc3bff213d56f52982eb53bdc8eb9d910f882e (diff)
Merge branch 'configurable-default-themes' into 'master'
make default light/dark themes configurable, add support for main application and login form See merge request tt-rss/tt-rss!169
Diffstat (limited to 'js/utility.js')
-rw-r--r--js/utility.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/js/utility.js b/js/utility.js
index 43ad5644e..070e9e2d1 100644
--- a/js/utility.js
+++ b/js/utility.js
@@ -7,8 +7,11 @@ 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/dark.css';
+
if (link) {
- const css_override = is_night ? "themes/night.css" : "themes/light.css";
+ const css_override = is_night ? dark_theme : light_theme;
link.setAttribute("href", css_override + "?" + Date.now());
}