facebook-mode: new page-mode
authorRaimon Grau <raimon@3scale.net>
Tue, 23 Apr 2013 13:48:45 +0000 (23 15:48 +0200)
committerJohn Foerch <jjfoerch@earthlink.net>
Tue, 23 Apr 2013 14:02:41 +0000 (23 10:02 -0400)
Provides fallthrough bindings for j, k, and return.

modules/page-modes/facebook.js [new file with mode: 0644]

diff --git a/modules/page-modes/facebook.js b/modules/page-modes/facebook.js
new file mode 100644 (file)
index 0000000..4be7a57
--- /dev/null
@@ -0,0 +1,25 @@
+/**
+ * (C) Copyright 2013 Raimon Grau
+ *
+ * Use, modification, and distribution are subject to the terms specified in the
+ * COPYING file.
+**/
+
+require("content-buffer.js");
+
+define_keymap("facebook_keymap", $display_name = "facebook");
+
+// Navigation
+define_key(facebook_keymap, "j", null, $fallthrough);
+define_key(facebook_keymap, "k", null, $fallthrough);
+define_key(facebook_keymap, "return", null, $fallthrough);
+
+define_keymaps_page_mode("facebook-mode",
+    build_url_regexp($domain = "facebook",
+                     $allow_www = true),
+    { normal: facebook_keymap },
+    $display_name = "Facebook");
+
+page_mode_activate(facebook_mode);
+
+provide("facebook");