summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dolgov <fox@fakecake.org>2025-08-10 17:30:57 +0300
committerAndrew Dolgov <fox@fakecake.org>2025-08-10 17:30:57 +0300
commit13e1d674ee438e70fd4c92a0603154e8a1cd5fda (patch)
tree0acd155b4252ac484a380da35bb83c329d9f599f
parentc6624d06a88ed26252782fb52e3b959665d52f91 (diff)
parentb803f85ec26b1d4ccbfafab9df697f54b8744211 (diff)
Merge branch 'bugfix/default-dark-theme-bookmarklets' into 'master'
Fix default dark mode CSS path in UtilityJS, use configurable default themes in bookmarklets. See merge request tt-rss/tt-rss!174
-rw-r--r--js/utility.js2
-rw-r--r--plugins/bookmarklets/init.php6
2 files changed, 7 insertions, 1 deletions
diff --git a/js/utility.js b/js/utility.js
index 070e9e2d1..2e27c4fe6 100644
--- a/js/utility.js
+++ b/js/utility.js
@@ -8,7 +8,7 @@ window.addEventListener("load", function() {
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';
+ 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;
diff --git a/plugins/bookmarklets/init.php b/plugins/bookmarklets/init.php
index f5b3ab1ca..206950a5b 100644
--- a/plugins/bookmarklets/init.php
+++ b/plugins/bookmarklets/init.php
@@ -60,6 +60,9 @@ class Bookmarklets extends Plugin {
</head>
<body class='flat ttrss_utility css_loading'>
<script type="text/javascript">
+ const __default_light_theme = "<?= get_theme_path(Config::get(Config::DEFAULT_LIGHT_THEME), 'themes/light.css') ?>";
+ const __default_dark_theme = "<?= get_theme_path(Config::get(Config::DEFAULT_DARK_THEME), 'themes/night.css') ?>";
+
const UtilityApp = {
init: function() {
require(['dojo/parser', "dojo/ready", 'dijit/form/Button','dijit/form/CheckBox', 'dijit/form/Form',
@@ -207,6 +210,9 @@ class Bookmarklets extends Plugin {
</head>
<body class='flat ttrss_utility share_popup css_loading'>
<script type="text/javascript">
+ const __default_light_theme = "<?= get_theme_path(Config::get(Config::DEFAULT_LIGHT_THEME), 'themes/light.css') ?>";
+ const __default_dark_theme = "<?= get_theme_path(Config::get(Config::DEFAULT_DARK_THEME), 'themes/night.css') ?>";
+
const UtilityApp = {
init: function() {
require(['dojo/parser', "dojo/ready", 'dijit/form/Button','dijit/form/CheckBox', 'dijit/form/Form',