summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2018-12-09 21:17:50 +0300
committerAndrew Dolgov <[email protected]>2018-12-09 21:17:50 +0300
commit1c8593c1fa68cd5287c975bb8ef96efce4edbbab (patch)
tree19deb4ac6fbbfe70f13611323c40bc0da65acb23 /include
parenta5813bb76699978fcaf7909796b1fbd953a4975b (diff)
add hotkey (a N) to toggle night.css
Diffstat (limited to 'include')
-rwxr-xr-xinclude/controls.php6
-rwxr-xr-xinclude/functions.php2
2 files changed, 6 insertions, 2 deletions
diff --git a/include/controls.php b/include/controls.php
index e64a90a8b..012bcf76c 100755
--- a/include/controls.php
+++ b/include/controls.php
@@ -233,10 +233,12 @@ function print_feed_cat_select($id, $default_id,
}
}
-function stylesheet_tag($filename) {
+function stylesheet_tag($filename, $id = false) {
$timestamp = filemtime($filename);
- return "<link rel=\"stylesheet\" type=\"text/css\" href=\"$filename?$timestamp\"/>\n";
+ $id_part = $id ? "id=\"$id\"" : "";
+
+ return "<link rel=\"stylesheet\" $id_part type=\"text/css\" href=\"$filename?$timestamp\"/>\n";
}
function javascript_tag($filename) {
diff --git a/include/functions.php b/include/functions.php
index 8d0b703f7..9c7d98b69 100755
--- a/include/functions.php
+++ b/include/functions.php
@@ -1174,6 +1174,7 @@
"create_label" => __("Create label"),
"create_filter" => __("Create filter"),
"collapse_sidebar" => __("Un/collapse sidebar"),
+ "toggle_night_mode" => __("Toggle night mode"),
"help_dialog" => __("Show help dialog"))
);
@@ -1245,6 +1246,7 @@
"c l" => "create_label",
"c f" => "create_filter",
"c s" => "collapse_sidebar",
+ "a *n" => "toggle_night_mode",
"^(191)|Ctrl+/" => "help_dialog",
);