aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--scudcloud-1.0/scudcloud-src.js10
1 files changed, 8 insertions, 2 deletions
diff --git a/scudcloud-1.0/scudcloud-src.js b/scudcloud-1.0/scudcloud-src.js
index e394b58..faef081 100644
--- a/scudcloud-1.0/scudcloud-src.js
+++ b/scudcloud-1.0/scudcloud-src.js
@@ -1,4 +1,5 @@
var ScudCloud = {
+ started: false,
overrideNotifications: function(){
TS.ui.growls.no_notifications = false;
TS.ui.growls.checkPermission = function() { return true; };
@@ -10,6 +11,10 @@ var ScudCloud = {
TS.ms.connected_sig.add(function(){ScudCloud.connect(true);});
TS.ms.disconnected_sig.add(function(){ScudCloud.connect(false);});
},
+ overrideBanner: function(){
+ ScudCloud.showBanner = TS.ui.banner.show;
+ TS.ui.banner.show = function(){ ScudCloud.showBanner(); ScudCloud.overrideNotifications(); };
+ },
connect: function(b){
desktop.enableMenus(b);
if(b) desktop.populate(JSON.stringify({'channels': ScudCloud.listChannels(), 'teams': ScudCloud.listTeams(), 'icon': TS.model.team.icon.image_88}));
@@ -67,8 +72,9 @@ var ScudCloud = {
return "undefined" != typeof TS && "undefined" != typeof TS.model && TS.model.ms_connected;
}
};
-if("undefined" != typeof TS){
+if("undefined" != typeof TS && false == ScudCloud.started){
document.onpaste = function(e){desktop.pasted(false);};
- ScudCloud.overrideNotifications();
ScudCloud.overrideConnect();
+ ScudCloud.overrideBanner();
+ ScudCloud.started = true;
}