Index: chrome/content/elemHideEmulation.js |
diff --git a/chrome/content/elemHideEmulation.js b/chrome/content/elemHideEmulation.js |
index 82912c51cfdff241d5cc886ee49c0422b082cb0c..d800c3de92c99c4848fef48b94df8c2a8cc3adc5 100644 |
--- a/chrome/content/elemHideEmulation.js |
+++ b/chrome/content/elemHideEmulation.js |
@@ -121,7 +121,7 @@ ElemHideEmulation.prototype = { |
this.addSelectors([stylesheet]); |
}, |
- load: function(callback) |
+ apply: function(callback) |
Sebastian Noack
2017/02/18 11:28:13
The callback parameter is unused now.
wspee
2017/02/18 12:49:50
Done.
|
{ |
this.getFiltersFunc(function(patterns) |
{ |
@@ -150,17 +150,12 @@ ElemHideEmulation.prototype = { |
}); |
} |
- callback(); |
+ if (this.patterns.length > 0) |
+ { |
+ var document = this.window.document; |
+ this.addSelectors(document.styleSheets); |
+ document.addEventListener("load", this.onLoad.bind(this), true); |
+ } |
}.bind(this)); |
- }, |
- |
- apply: function() |
- { |
- if (this.patterns.length > 0) |
- { |
- var document = this.window.document; |
- this.addSelectors(document.styleSheets); |
- document.addEventListener("load", this.onLoad.bind(this), true); |
- } |
} |
}; |