Index: chrome/content/elemHideEmulation.js |
diff --git a/chrome/content/elemHideEmulation.js b/chrome/content/elemHideEmulation.js |
index 82912c51cfdff241d5cc886ee49c0422b082cb0c..b3bb449d44a9a60dc9e21703d11346e440e3dec1 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() |
{ |
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); |
- } |
} |
}; |