evaluate: invalidate startup cache before loading temp file
[conkeror.git] / modules / page-modes / twitter.js
blob861f31d5a4e032f3d89095a6e6caf057c0045e83
1 /**
2  * (C) Copyright 2010 Mike Fisher
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");
12 define_keymap("twitter_keymap", $display_name = "twitter");
14 // Help
15 define_key(twitter_keymap, "?", null, $fallthrough);
17 // Navigation
18 define_key(twitter_keymap, "j", null, $fallthrough);
19 define_key(twitter_keymap, "k", null, $fallthrough);
20 define_key(twitter_keymap, "space", null, $fallthrough);
21 define_key(twitter_keymap, "S-space", null, $fallthrough);
22 define_key(twitter_keymap, "/", null, $fallthrough);
23 define_key(twitter_keymap, ".", null, $fallthrough);
25 // Timelines
26 define_key(twitter_keymap, "g", null, $fallthrough);
27 define_key(twitter_keymap, "h", null, $fallthrough);
28 define_key(twitter_keymap, "r", null, $fallthrough);
29 define_key(twitter_keymap, "p", null, $fallthrough);
30 define_key(twitter_keymap, "f", null, $fallthrough);
31 define_key(twitter_keymap, "m", null, $fallthrough);
32 define_key(twitter_keymap, "u", null, $fallthrough);
34 // Acting
35 define_key(twitter_keymap, "f", null, $fallthrough);
36 define_key(twitter_keymap, "r", null, $fallthrough);
37 define_key(twitter_keymap, "t", null, $fallthrough);
38 define_key(twitter_keymap, "m", null, $fallthrough);
39 define_key(twitter_keymap, "n", null, $fallthrough);
41 define_key(twitter_keymap, "return", null, $fallthrough);
43 var twitter_modality = {
44     normal: twitter_keymap
47 define_page_mode("twitter_mode",
48                  $display_name = "Twitter",
49                  $enable = function (buffer) {
50                      buffer.content_modalities.push(twitter_modality);
51                  },
52                  $disable = function (buffer) {
53                      var i = buffer.content_modalities.indexOf(twitter_modality);
54                      if (i > -1)
55                          buffer.content_modalities.splice(i, 1);
56                  });
58 let (re = build_url_regex($domain = "twitter",
59                           $allow_www = true)) {
60     auto_mode_list.push([re, twitter_mode]);
63 provide("twitter");