application: clear the startup-cache at startup
[conkeror.git] / modules / page-modes / google-voice.js
blobe32333f993d3ec7151bd69d3ed119522349488b0
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_voice_keymap", $display_name = "google-voice");
14 define_fallthrough(google_voice_keymap, match_any_unmodified_character);
16 // Shortcuts
17 define_key(google_voice_keymap, "c", null, $fallthrough);
18 define_key(google_voice_keymap, "m", null, $fallthrough);
19 define_key(google_voice_keymap, "escape", null, $fallthrough);
20 define_key(google_voice_keymap, "/", null, $fallthrough);
21 define_key(google_voice_keymap, "right", null, $fallthrough);
22 define_key(google_voice_keymap, "n", null, $fallthrough);
23 define_key(google_voice_keymap, "left", null, $fallthrough);
24 define_key(google_voice_keymap, "p", null, $fallthrough);
25 define_key(google_voice_keymap, "#", null, $fallthrough);
26 define_key(google_voice_keymap, "!", null, $fallthrough);
27 define_key(google_voice_keymap, "I", null, $fallthrough);
28 define_key(google_voice_keymap, "U", null, $fallthrough);
30 // Combo keys
31 define_key(google_voice_keymap, "g i", null, $fallthrough);
32 define_key(google_voice_keymap, "g s", null, $fallthrough);
33 define_key(google_voice_keymap, "g h", null, $fallthrough);
34 define_key(google_voice_keymap, "g i", null, $fallthrough);
35 define_key(google_voice_keymap, "g r", null, $fallthrough);
36 define_key(google_voice_keymap, "g m", null, $fallthrough);
37 define_key(google_voice_keymap, "g c", null, $fallthrough);
38 define_key(google_voice_keymap, "g u", null, $fallthrough);
39 define_key(google_voice_keymap, "* a", null, $fallthrough);
40 define_key(google_voice_keymap, "* n", null, $fallthrough);
41 define_key(google_voice_keymap, "* r", null, $fallthrough);
42 define_key(google_voice_keymap, "* u", null, $fallthrough);
45 var google_voice_modality = {
46     normal: google_voice_keymap
50 define_page_mode("google_voice_mode",
51                  $display_name = "Google Voice",
52                  $enable = function (buffer) {
53                      buffer.content_modalities.push(google_voice_modality);
54                  },
55                  $disable = function (buffer) {
56                      var i = buffer.content_modalities.indexOf(google_voice_modality);
57                      if (i > -1)
58                          buffer.content_modalities.splice(i, 1);
59                  });
61 var google_voice_re = build_url_regex($domain = "google",
62                                       $allow_www = true,
63                                       $path = "voice");
64 auto_mode_list.push([google_voice_re, google_voice_mode]);
66 provide("google-voice");