2 * (C) Copyright 2008 Will Farrington
3 * (C) Copyright 2009-2010 John J. Foerch
5 * Use, modification, and distribution are subject to the terms specified in the
11 require("content-buffer.js");
14 define_keymap("google_reader_keymap", $display_name = "google-reader");
15 define_fallthrough(google_reader_keymap, match_any_unmodified_character);
18 define_key(google_reader_keymap, "?", null, $fallthrough);
21 define_key(google_reader_keymap, "j", null, $fallthrough);
22 define_key(google_reader_keymap, "k", null, $fallthrough);
23 define_key(google_reader_keymap, "space", null, $fallthrough);
24 define_key(google_reader_keymap, "S-space", null, $fallthrough);
25 define_key(google_reader_keymap, "n", null, $fallthrough);
26 define_key(google_reader_keymap, "N", null, $fallthrough);
27 define_key(google_reader_keymap, "p", null, $fallthrough);
28 define_key(google_reader_keymap, "P", null, $fallthrough);
29 define_key(google_reader_keymap, "X", null, $fallthrough);
30 define_key(google_reader_keymap, "O", null, $fallthrough);
33 define_key(google_reader_keymap, "g", null, $fallthrough);
34 define_key(google_reader_keymap, "h", null, $fallthrough);
37 define_key(google_reader_keymap, "s", null, $fallthrough);
38 define_key(google_reader_keymap, "S", null, $fallthrough);
39 define_key(google_reader_keymap, "v", null, $fallthrough);
40 define_key(google_reader_keymap, "t", null, $fallthrough);
41 define_key(google_reader_keymap, "m", null, $fallthrough);
42 define_key(google_reader_keymap, "o", null, $fallthrough);
43 define_key(google_reader_keymap, "A", null, $fallthrough);
44 define_key(google_reader_keymap, "e", null, $fallthrough);
47 define_key(google_reader_keymap, "r", null, $fallthrough);
48 define_key(google_reader_keymap, "u", null, $fallthrough);
49 define_key(google_reader_keymap, "1", null, $fallthrough);
50 define_key(google_reader_keymap, "2", null, $fallthrough);
51 define_key(google_reader_keymap, "/", null, $fallthrough);
52 define_key(google_reader_keymap, "a", null, $fallthrough);
55 var google_reader_modality = {
56 normal: google_reader_keymap
59 define_page_mode("google_reader_mode",
60 $display_name = "Google Reader",
61 $enable = function (buffer) {
62 buffer.content_modalities.push(google_reader_modality);
64 $disable = function (buffer) {
65 var i = buffer.content_modalities.indexOf(google_reader_modality);
67 buffer.content_modalities.splice(i, 1);
70 var google_reader_re = build_url_regex($domain = "google",
71 $tlds = ["com", "co.uk"],
74 auto_mode_list.push([google_reader_re, google_reader_mode]);
76 provide("google-reader");