first commit
This commit is contained in:
27
init.php
Normal file
27
init.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?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;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user