Index: lib/contentPolicy.js |
=================================================================== |
--- a/lib/contentPolicy.js |
+++ b/lib/contentPolicy.js |
@@ -66,17 +66,17 @@ var Policy = exports.Policy = |
* Called on module startup, initializes various exported properties. |
*/ |
init: function() |
{ |
// whitelisted URL schemes |
for (let scheme of Prefs.whitelistschemes.toLowerCase().split(" ")) |
this.whitelistSchemes.add(scheme); |
- Utils.addChildMessageListener("AdblockPlus:ShouldAllow", this.shouldAllow.bind(this)); |
+ Utils.addChildMessageListener("AdblockPlus:ShouldAllow", message => this.shouldAllow(message)); |
// Generate class identifier used to collapse nodes and register |
// corresponding stylesheet. |
let collapsedClass = ""; |
let offset = "a".charCodeAt(0); |
for (let i = 0; i < 20; i++) |
collapsedClass += String.fromCharCode(offset + Math.random() * 26); |
Utils.addChildMessageListener("AdblockPlus:GetCollapsedClass", () => collapsedClass); |