This file is indexed.

/usr/share/hotot/js/background.js is in hotot-common 1:0.9.8.14-2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
// Generated by CoffeeScript 1.3.3
(function() {
  var getActiveWindow, install, onExtRequest, onTabCreated, onTabRemoved, onTabUpdated, root, shareLink, sharePage, shareSelection, shareWithHotot, showHototTab, tabChangedHandler, uninstall;

  tabChangedHandler = function(tab) {
    if (tab.url.indexOf(chrome.extension.getURL("index.html")) !== -1) {
      if (root._hototTab) {
        if (tab.id !== root._hototTab.id) {
          showHototTab();
        }
      } else {
        root._hototTab = tab;
      }
    }
  };

  sharePage = function(info, tab) {
    shareWithHotot(tab.title + ' ' + info.pageUrl);
  };

  shareSelection = function(info, tab) {
    shareWithHotot("\"" + info.selectionText + "\" via: " + info.pageUrl);
  };

  shareLink = function(info, tab) {
    shareWithHotot(info.linkUrl);
  };

  getActiveWindow = function() {
    var v, views, _i, _len;
    views = chrome.extension.getViews();
    for (_i = 0, _len = views.length; _i < _len; _i++) {
      v = views[_i];
      if (v.location.href === root._hototTab.url) {
        return v;
      }
    }
    return null;
  };

  showHototTab = function() {
    var proc;
    if (root._hototTab) {
      proc = function(c) {
        var _ref;
                if ((_ref = c.focused) != null) {
          _ref;

        } else {
          chrome.windows.update(c.id, {
            focused: true
          });
        };
      };
      chrome.tabs.get(root._hototTab.id, function(c) {
        root._hototTab = c;
        return chrome.windows.get(c.windowId, proc);
      });
      chrome.tabs.update(root._hototTab.id, {
        selected: true
      });
    }
  };

  shareWithHotot = function(str) {
    var _doShare;
    _doShare = function() {
      var win, _testProc;
      win = getActiveWindow();
      _testProc = function() {
        if (win && win.globals) {
          if (win.globals.signed_in) {
            win.ui.StatusBox.change_mode(win.ui.StatusBox.MODE_TWEET);
            win.ui.StatusBox.set_status_text(str);
            return win.ui.StatusBox.open();
          } else {
            try {
              return win.toast.set('You must sign in to share content.').show(-1);
            } catch (e) {
              return setTimeout(_testProc, 1000);
            }
          }
        } else {
          return setTimeout(_testProc, 500);
        }
      };
      return _testProc();
    };
    if (root._hototTab && root._hototTab.id) {
      showHototTab();
      _doShare();
    } else {
      chrome.tabs.create({
        url: "index.html"
      }, function() {
        return setTimeout(_doShare, 500);
      });
    }
  };

  onTabCreated = function(tab) {
    tabChangedHandler(tab);
  };

  onTabUpdated = function(id, info, tab) {
    tabChangedHandler(tab);
  };

  onTabRemoved = function(id, info) {
    if (root._hototTab) {
      if (root._hototTab.id === id) {
        root._hototTab = null;
      }
    }
  };

  onExtRequest = function(req, sender, response) {
    if (req.enableContextMenu) {
      install();
      response({
        'reply': 'getcha, context menu has been enabled.'
      });
    } else {
      uninstall();
      response({
        'reply': 'getcha, context menu has been disabled.'
      });
    }
  };

  install = function() {
    var contexts;
    contexts = ["page", "selection", "link"];
    if (root._menuItemSharePageId === null) {
      root._menuItemSharePageId = chrome.contextMenus.create({
        "title": "Share Page with Hotot",
        "contexts": ["page"],
        "onclick": sharePage
      });
    }
    if (root._menuItemShareSelId === null) {
      root._menuItemShareSelId = chrome.contextMenus.create({
        "title": "Share Selection with Hotot",
        "contexts": ["selection"],
        "onclick": shareSelection
      });
    }
    if (root._menuItemShareLinkId === null) {
      root._menuItemShareLinkId = chrome.contextMenus.create({
        "title": "Share Link with Hotot",
        "contexts": ["link"],
        "onclick": shareLink
      });
    }
  };

  uninstall = function() {
    chrome.contextMenus.removeAll();
    root._menuItemSharePageId = null;
    root._menuItemShareSelId = null;
    root._menuItemShareLinkId = null;
    if (chrome.tabs.onCreated.hasListener(onTabCreated)) {
      chrome.tabs.onCreated.removeListener(onTabCreated);
    }
    if (chrome.tabs.onUpdated.hasListener(onTabUpdated)) {
      chrome.tabs.onUpdated.removeListener(onTabUpdated);
    }
  };

  chrome.tabs.onCreated.addListener(onTabCreated);

  chrome.tabs.onUpdated.addListener(onTabUpdated);

  chrome.tabs.onRemoved.addListener(onTabRemoved);

  chrome.extension.onRequest.addListener(onExtRequest);

  root = typeof exports !== "undefined" && exports !== null ? exports : this;

  root._hototTab = null;

  root._install = install;

  root._uninstall = uninstall;

  root._menuItemSharePageId = null;

  root._menuItemShareSelId = null;

  root._menuItemShareLinkId = null;

}).call(this);