mirror of
https://github.com/Mibew/emoji-plugin.git
synced 2025-01-22 09:30:33 +03:00
Make the plugin works with invitations
This commit is contained in:
parent
14392ac494
commit
da1e7b2352
17
js/plugin.js
17
js/plugin.js
@ -17,15 +17,24 @@
|
||||
*/
|
||||
|
||||
(function (Mibew) {
|
||||
// Initialize separated Marionette.js module for the plugin.
|
||||
var module = Mibew.Application.module(
|
||||
'Chat.MibewEmojiPlugin',
|
||||
'MibewEmojiPlugin',
|
||||
{startWithParent: false}
|
||||
);
|
||||
|
||||
// Start the module only after the parent one will be initialized.
|
||||
Mibew.Application.Chat.on('start', function() {
|
||||
// Make the plugin works together with "Chat" and "Invitation" modules.
|
||||
var eventsMap = {
|
||||
'start': function() {
|
||||
module.start();
|
||||
});
|
||||
},
|
||||
'stop': function() {
|
||||
module.stop();
|
||||
}
|
||||
}
|
||||
|
||||
Mibew.Application.Chat.on(eventsMap);
|
||||
Mibew.Application.Invitation.on(eventsMap);
|
||||
|
||||
module.addInitializer(function() {
|
||||
var imagesDir = Mibew.PluginOptions.MibewEmoji.imagesDir;
|
||||
|
Loading…
Reference in New Issue
Block a user