js: allow plugins to declare themselves as exclusive handlers

This commit is contained in:
Tristan Matthews 2013-10-01 21:33:08 -04:00 committed by David Cormier
parent 5168b833cb
commit 1a66d18537

View file

@ -118,6 +118,10 @@ weechat.factory('pluginManager', ['youtubePlugin', 'urlPlugin', 'imagePlugin', f
if (pluginContent) {
var pluginContent = {'visible': false, 'content': pluginContent }
content.push(pluginContent);
if (plugins[i].exclusive) {
break;
}
}
}
@ -143,7 +147,8 @@ weechat.factory('youtubePlugin', [function() {
}
return {
contentForMessage: contentForMessage
contentForMessage: contentForMessage,
exclusive: true
}
}]);
@ -158,7 +163,8 @@ weechat.factory('urlPlugin', [function() {
}
return {
contentForMessage: contentForMessage
contentForMessage: contentForMessage,
exclusive: false
}
}]);