Skip to content
This repository has been archived by the owner on Sep 9, 2022. It is now read-only.

Commit

Permalink
Trying to fix merge
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexVallat committed Mar 10, 2015
1 parent 62c8ffb commit 825adfa
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 4 deletions.
2 changes: 1 addition & 1 deletion platform/firefox/bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ function startup(data, reason) {
);
};

if (reason !== APP_STARTUP) {
if ( reason !== APP_STARTUP ) {
onReady();
return;
}
Expand Down
26 changes: 23 additions & 3 deletions platform/firefox/vapi-background.js
Original file line number Diff line number Diff line change
Expand Up @@ -1139,7 +1139,7 @@ var httpObserver = {
if ( !(channel instanceof Ci.nsIHttpChannel) ) {
return;
}

var URI = channel.URI;
var channelData, result;

Expand Down Expand Up @@ -1483,7 +1483,7 @@ vAPI.toolbarButton.init = function() {
'content: attr(badge);',
'}'
);
} else {
} else {
this.CUIEvents = {};

var updateBadge = function() {
Expand Down Expand Up @@ -1584,7 +1584,6 @@ vAPI.toolbarButton.init = function() {
}.bind(this));
};


/******************************************************************************/

vAPI.toolbarButton.onBeforeCreated = function(doc) {
Expand Down Expand Up @@ -1654,6 +1653,27 @@ vAPI.toolbarButton.onViewHiding = function({target}) {
target.firstChild.setAttribute('src', 'about:blank');
};

vAPI.toolbarButton.updateState = function(win, tabId) {
var button = win.document.getElementById(this.id);

if ( !button ) {
return;
}

var icon = this.tabs[tabId];
button.setAttribute('badge', icon && icon.badge || '');

if ( !icon || !icon.img ) {
icon = '';
}
else {
icon = 'url(' + vAPI.getURL('img/browsericons/icon16.svg') + ')';
}

button.style.listStyleImage = icon;
};
}

/******************************************************************************/

vAPI.toolbarButton.init();
Expand Down

0 comments on commit 825adfa

Please sign in to comment.