build_url_regex renamed to build_url_regexp
[conkeror.git] / modules / page-modes / google-gqueues.js
blob04a1c1cc94a3b8506a11a46b1275b0ad507a278f
1 /**
2  * (C) Copyright 2010 Vinh Q. Nguyen
3  *
4  * Use, modification, and distribution are subject to the terms specified in the
5  * COPYING file.
6 **/
8 in_module(null);
10 require("content-buffer.js");
13 define_keymap("google_gqueues_keymap", $display_name = "google-gqueues");
14 define_fallthrough(google_gqueues_keymap, match_any_unmodified_character);
16 // Current Item
17 define_key(google_gqueues_keymap, "e", null, $fallthrough);
18 define_key(google_gqueues_keymap, "n", null, $fallthrough);
19 define_key(google_gqueues_keymap, "t", null, $fallthrough);
20 define_key(google_gqueues_keymap, "c", null, $fallthrough);
21 define_key(google_gqueues_keymap, "s", null, $fallthrough);
22 define_key(google_gqueues_keymap, "x", null, $fallthrough);
23 define_key(google_gqueues_keymap, "d", null, $fallthrough);
24 define_key(google_gqueues_keymap, "D", null, $fallthrough);
25 define_key(google_gqueues_keymap, "i", null, $fallthrough);
27 // Editing
28 define_key(google_gqueues_keymap, "tab", null, $fallthrough);
29 define_key(google_gqueues_keymap, "S-tab", null, $fallthrough);
31 // Navigation
32 define_key(google_gqueues_keymap, "up", null, $fallthrough);
33 define_key(google_gqueues_keymap, "down", null, $fallthrough);
34 define_key(google_gqueues_keymap, "left", null, $fallthrough);
35 define_key(google_gqueues_keymap, "right", null, $fallthrough);
36 define_key(google_gqueues_keymap, "S-up", null, $fallthrough);
37 define_key(google_gqueues_keymap, "S-down", null, $fallthrough);
38 define_key(google_gqueues_keymap, "j", null, $fallthrough);
39 define_key(google_gqueues_keymap, "k", null, $fallthrough);
40 define_key(google_gqueues_keymap, "l", null, $fallthrough);
41 define_key(google_gqueues_keymap, "h", null, $fallthrough);
42 define_key(google_gqueues_keymap, "J", null, $fallthrough);
43 define_key(google_gqueues_keymap, "K", null, $fallthrough);
45 var google_gqueues_modality = {
46     normal: google_gqueues_keymap
49 define_page_mode("google-gqueues-mode",
50     build_url_regexp($domain = "gqueues",
51                      $allow_www = true,
52                      $path = "main"),
53     function enable (buffer) {
54         buffer.content_modalities.push(google_gqueues_modality);
55     },
56     function disable (buffer) {
57         var i = buffer.content_modalities.indexOf(google_gqueues_modality);
58         if (i > -1)
59             buffer.content_modalities.splice(i, 1);
60     },
61     $display_name = "Google GQueues");
63 page_mode_activate("google_gqueues_mode");
65 provide("google-gqueues");