summaryrefslogtreecommitdiff
path: root/plugins/swap_jk/init.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2012-12-30 13:36:40 +0400
committerAndrew Dolgov <[email protected]>2012-12-30 13:36:40 +0400
commite938b1de117cfde17a5773fe0c6fc92185c873fe (patch)
tree4afe7134ba505ba9209833cf193603beb32706cb /plugins/swap_jk/init.php
parent0e44c2a0d422617a59e3926cf3ae22872aac041a (diff)
rename plugin main class files
Diffstat (limited to 'plugins/swap_jk/init.php')
-rw-r--r--plugins/swap_jk/init.php29
1 files changed, 29 insertions, 0 deletions
diff --git a/plugins/swap_jk/init.php b/plugins/swap_jk/init.php
new file mode 100644
index 000000000..34b09bd77
--- /dev/null
+++ b/plugins/swap_jk/init.php
@@ -0,0 +1,29 @@
+<?php
+class Swap_JK extends Plugin {
+
+ private $link;
+ private $host;
+
+ function about() {
+ return array(1.0,
+ "Swap j and k hotkeys (for vi brethren)",
+ "fox");
+ }
+
+ function init($host) {
+ $this->link = $host->get_link();
+ $this->host = $host;
+
+ $host->add_hook($host::HOOK_HOTKEY_MAP, $this);
+ }
+
+ function hook_hotkey_map($hotkeys) {
+
+ $hotkeys["j"] = "next_feed";
+ $hotkeys["k"] = "prev_feed";
+
+ return $hotkeys;
+
+ }
+}
+?>