You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

27 lines
507 B

<?php
class Toggle_Night_Mode extends Plugin {
function about() {
return array(2.2,
"Allow night mode toggle with [a N] for custom themes (use yourtheme_night.css as filename)",
"ltGuillaume");
}
function init($host) {
$host->add_hook($host::HOOK_HOTKEY_MAP, $this);
}
function hook_hotkey_map($hotkeys) {
$hotkeys["a N"] = "toggle_night_mode";
return $hotkeys;
}
function get_js() {
return file_get_contents(__DIR__ . "/init.js");
}
function api_version() {
return 2;
}
}