aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexVallat <github@alex.vallat.name>2015-03-10 18:44:31 +0000
committerAlexVallat <github@alex.vallat.name>2015-03-10 18:44:31 +0000
commit825adfa80e428d9fee327965f15a3f17a0252d4e (patch)
treea5cbafd696480f2fd1e3a2a77e47aceb2f6a2f5d
parent62c8ffbcc4e75073ad4b73bcc9b2cf523a7c79e4 (diff)
downloaduBlock-825adfa80e428d9fee327965f15a3f17a0252d4e.zip
uBlock-825adfa80e428d9fee327965f15a3f17a0252d4e.tar.gz
uBlock-825adfa80e428d9fee327965f15a3f17a0252d4e.tar.bz2
Trying to fix merge
-rw-r--r--platform/firefox/bootstrap.js2
-rw-r--r--platform/firefox/vapi-background.js26
2 files changed, 24 insertions, 4 deletions
diff --git a/platform/firefox/bootstrap.js b/platform/firefox/bootstrap.js
index b634976..fec5827 100644
--- a/platform/firefox/bootstrap.js
+++ b/platform/firefox/bootstrap.js
@@ -74,7 +74,7 @@ function startup(data, reason) {
);
};
- if (reason !== APP_STARTUP) {
+ if ( reason !== APP_STARTUP ) {
onReady();
return;
}
diff --git a/platform/firefox/vapi-background.js b/platform/firefox/vapi-background.js
index ce792d1..10cb25d 100644
--- a/platform/firefox/vapi-background.js
+++ b/platform/firefox/vapi-background.js
@@ -1139,7 +1139,7 @@ var httpObserver = {
if ( !(channel instanceof Ci.nsIHttpChannel) ) {
return;
}
-
+
var URI = channel.URI;
var channelData, result;
@@ -1483,7 +1483,7 @@ vAPI.toolbarButton.init = function() {
'content: attr(badge);',
'}'
);
- } else {
+ } else {
this.CUIEvents = {};
var updateBadge = function() {
@@ -1584,7 +1584,6 @@ vAPI.toolbarButton.init = function() {
}.bind(this));
};
-
/******************************************************************************/
vAPI.toolbarButton.onBeforeCreated = function(doc) {
@@ -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();