├── bootstrap.js ├── changelog.md ├── chrome.manifest ├── chrome ├── content │ ├── addfinger.js │ ├── addfinger.xul │ ├── auth.js │ ├── auth.xul │ ├── coniks │ │ ├── coniks.js │ │ ├── context.js │ │ └── libconiks.js │ ├── finger.js │ ├── finger.xul │ ├── helpers.js │ ├── libc.js │ ├── libotr.js │ ├── otr.js │ ├── prefs.js │ ├── prefs.xul │ ├── priv.js │ ├── priv.xul │ ├── ui.js │ └── worker.js ├── locale │ └── en │ │ ├── auth.dtd │ │ ├── auth.properties │ │ ├── finger.dtd │ │ ├── finger.properties │ │ ├── otr.properties │ │ ├── prefs.dtd │ │ ├── priv.dtd │ │ ├── priv.properties │ │ └── ui.properties └── skin │ ├── icons │ ├── finished.png │ ├── not-private.png │ ├── private.png │ └── unverified.png │ └── otr.css ├── install.rdf ├── license ├── package.json └── readme.md /bootstrap.js: -------------------------------------------------------------------------------- 1 | var { interfaces: Ci, utils: Cu, classes: Cc } = Components; 2 | 3 | Cu.import("resource:///modules/imServices.jsm"); 4 | 5 | function init() { 6 | Cu.import("chrome://otr/content/ui.js"); 7 | let sss = Cc["@mozilla.org/content/style-sheet-service;1"].getService(Ci.nsIStyleSheetService); 8 | let ios = Cc["@mozilla.org/network/io-service;1"].getService(Ci.nsIIOService); 9 | let uri = ios.newURI("chrome://otr/skin/otr.css", null, null); 10 | sss.loadAndRegisterSheet(uri, sss.USER_SHEET); 11 | ui.init(); 12 | } 13 | 14 | function initializer() { 15 | init(); 16 | Services.obs.removeObserver(initializer, "prpl-init"); 17 | } 18 | 19 | function startup(data, reason) { 20 | if (Services.core.initialized) 21 | init(); 22 | else 23 | Services.obs.addObserver(initializer, "prpl-init", false); 24 | } 25 | 26 | function shutdown(data, reason) { 27 | if (reason === APP_SHUTDOWN) 28 | return; 29 | ui.destroy(); 30 | Cu.unload("chrome://otr/content/ui.js"); 31 | } 32 | 33 | function install(data, reason) {} 34 | function uninstall(data, reason) {} -------------------------------------------------------------------------------- /changelog.md: -------------------------------------------------------------------------------- 1 | 2 | 0.0.4 / 2016-12-14 3 | ================== 4 | 5 | * export-ignore .jshintrc 6 | * Remove hacky _addedNodes 7 | * Cleanup menu observers 8 | * Fix Add Contact's Fingerprint menu item disappearing 9 | * Fix some linting errors 10 | * More reliably checkout the pin of coniks-go 11 | 12 | 0.0.3 / 2016-11-11 13 | ================== 14 | 15 | * Pin coniks-go to 90075472 16 | * Remove incomplete translations until we have an import script 17 | 18 | 0.0.2 / 2016-08-31 19 | ================== 20 | 21 | * Use a different hack to disable update pings 22 | * Add coniks preferences GUI 23 | 24 | 0.0.1 / 2016-08-20 25 | ================== 26 | 27 | * Thar be dragons 28 | 29 | 0.0.0 / 2015-07-13 30 | ================== 31 | 32 | * Thar be dragons 33 | 34 | -------------------------------------------------------------------------------- /chrome.manifest: -------------------------------------------------------------------------------- 1 | content otr chrome/content/ 2 | skin otr classic/1.0 chrome/skin/ 3 | 4 | locale otr en chrome/locale/en/ 5 | -------------------------------------------------------------------------------- /chrome/content/addfinger.js: -------------------------------------------------------------------------------- 1 | var { interfaces: Ci, utils: Cu, classes: Cc } = Components; 2 | 3 | Cu.import("resource:///modules/imServices.jsm"); 4 | Cu.import("resource:///modules/imXPCOMUtils.jsm"); 5 | Cu.import("chrome://otr/content/otr.js"); 6 | 7 | XPCOMUtils.defineLazyGetter(this, "_", () => 8 | l10nHelper("chrome://otr/locale/finger.properties") 9 | ); 10 | 11 | var args = window.arguments[0].wrappedJSObject; 12 | 13 | var otrAddFinger = { 14 | onload: function() { 15 | document.title = _("addfinger.title", args.screenname); 16 | }, 17 | 18 | oninput: function(e) { 19 | e.value = e.value.replace(/[^0-9a-fA-F]/gi, ""); 20 | document.documentElement.getButton("accept").disabled = (e.value.length != 40); 21 | }, 22 | 23 | add: function(e) { 24 | let hex = document.getElementById("finger").value; 25 | let context = otr.getContextFromRecipient( 26 | args.account, 27 | args.protocol, 28 | args.screenname 29 | ); 30 | finger = otr.addFingerprint(context, hex); 31 | if (finger.isNull()) 32 | return; 33 | try { 34 | // Ignore the return, this is just a test. 35 | otr.getUIConvFromContext(context); 36 | } catch(error) { 37 | // We expect that a conversation may not have been started. 38 | context = null; 39 | } 40 | otr.setTrust(finger, true, context); 41 | }, 42 | }; 43 | -------------------------------------------------------------------------------- /chrome/content/addfinger.xul: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 16 | 17 |