/usr/share/hotot/js/readlater.js is in hotot-common 1:0.9.8.14-3.
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 | // Generated by CoffeeScript 1.3.3
(function() {
var ReadLater, root;
ReadLater = (function() {
function ReadLater(username, password) {
this.username = username;
this.password = password;
this.pocket_apikey = '4c2T7D4dg52f6r440gd746eW4cpkG7f6';
this.pocket_auth_url = 'https://readitlaterlist.com/v2/auth?username={%USERNAME%}&password={%PASSWORD%}&apikey=' + this.pocket_apikey;
this.pocket_add_url = 'https://readitlaterlist.com/v2/add?username={%USERNAME%}&password={%PASSWORD%}&apikey=' + this.pocket_apikey + '&url={%URL%}&title={%SELECTION%}';
this.instap_auth_url = 'https://www.instapaper.com/api/authenticate?username={%USERNAME%}&password={%PASSWORD%}';
this.instapp_add_url = 'https://www.instapaper.com/api/add?username={%USERNAME%}&password={%PASSWORD%}&url={%URL%}&title=&selection={%SELECTION%}';
}
ReadLater.prototype.init = function(username, password) {
this.username = username;
return this.password = password;
};
ReadLater.prototype.addItem = function(service, url, text, callback) {
var req_url;
if (service === 'pocket') {
req_url = this.pocket_add_url;
} else {
req_url = this.instapp_add_url;
}
req_url = req_url.replace('{%USERNAME%}', encodeURIComponent(this.username));
req_url = req_url.replace('{%PASSWORD%}', encodeURIComponent(this.password));
req_url = req_url.replace('{%URL%}', encodeURIComponent(url));
req_url = req_url.replace('{%SELECTION%}', encodeURIComponent(text));
return $.get(req_url, callback);
};
return ReadLater;
})();
root = typeof exports !== "undefined" && exports !== null ? exports : this;
root.ReadLaterServ = ReadLater;
}).call(this);
|