diff options
author | gorhill <rhill@raymondhill.net> | 2014-12-22 14:48:17 -0500 |
---|---|---|
committer | gorhill <rhill@raymondhill.net> | 2014-12-22 14:48:17 -0500 |
commit | e904e96d4d398c3507806915c8f863b46c06adb2 (patch) | |
tree | 17970b34c1ceae27d266036336bdcd1569d03b27 /src/js | |
parent | 2c7d75c868e1aa7564285f36e44c82904e392cf3 (diff) | |
download | uBlock-e904e96d4d398c3507806915c8f863b46c06adb2.zip uBlock-e904e96d4d398c3507806915c8f863b46c06adb2.tar.gz uBlock-e904e96d4d398c3507806915c8f863b46c06adb2.tar.bz2 |
this fixes #436
Diffstat (limited to 'src/js')
-rw-r--r-- | src/js/ublock.js | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/js/ublock.js b/src/js/ublock.js index 2c3f2a3..ea1fc33 100644 --- a/src/js/ublock.js +++ b/src/js/ublock.js @@ -108,20 +108,19 @@ var matchWhitelistDirective = function(url, hostname, directive) { var targetHostname = this.URI.hostnameFromURI(targetURL); var key = targetHostname; var directive = scope === 'page' ? targetURL : targetHostname; - var buckets; // Add to directive list if ( newState === false ) { if ( netWhitelist.hasOwnProperty(key) === false ) { - buckets = netWhitelist[key] = []; + netWhitelist[key] = []; } - buckets.push(directive); + netWhitelist[key].push(directive); this.saveWhitelist(); return true; } // Remove from directive list whatever causes current URL to be whitelisted - var i; + var buckets, i; for (;;) { if ( netWhitelist.hasOwnProperty(key) ) { buckets = netWhitelist[key]; |