-
Notifications
You must be signed in to change notification settings - Fork 1
/
prpl.js
34 lines (26 loc) · 1.01 KB
/
prpl.js
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
/**
* Main file for slack prpl
*/
const EXPORTED_SYMBOLS = ["SlackPrpl", "NSGetFactory"];
const { interfaces: Ci, utils: Cu } = Components;
Cu.import("resource:///modules/imXPCOMUtils.jsm");
Cu.import("resource:///modules/jsProtoHelper.jsm");
Cu.import("chrome://moslack/content/Utils.jsm");
Cu.import("chrome://moslack/content/Account.jsm");
function SlackPrpl() {
this.wrappedJSObject = this;
}
SlackPrpl.prototype = Utils.extend(GenericProtocolPrototype, {
get name() "Slack",
get iconBaseURI() "chrome://moslack/content/",
get imagesInIM() false,
getAccount: function (aImAccount) new SlackAccount(this, aImAccount),
get usernameSplits() [
{label: 'Team', separator: '@', reverse: true, defaultValue: ''}
],
get classID() Components.ID("{44bfbca4-cc23-433d-a166-8e4ea6e73b5f}"),
get _xpcom_factory() XPCOMUtils.generateSingletonFactory(SlackPrpl),
get wrappedJSObject() this,
toString() `<SlackPrpl>`,
});
const NSGetFactory = XPCOMUtils.generateNSGetFactory([SlackPrpl]);