diff --git a/src/js/traffic.js b/src/js/traffic.js index b4c86fb07..e20b5857d 100644 --- a/src/js/traffic.js +++ b/src/js/traffic.js @@ -260,7 +260,7 @@ var onHeadersReceived = function(details) { pageStore.requestHostname = µb.URI.hostnameFromURI(details.url); pageStore.requestType = 'inline-script'; var result = pageStore.filterRequest(pageStore); - if ( result === '' ) { + if ( µb.isAllowResult(result) ) { return; } diff --git a/src/js/ublock.js b/src/js/ublock.js index 75c63ab20..26ab7f8d5 100644 --- a/src/js/ublock.js +++ b/src/js/ublock.js @@ -394,4 +394,15 @@ var matchWhitelistDirective = function(url, hostname, directive) { /******************************************************************************/ +µBlock.isBlockResult = function(result) { + return typeof result === 'string' && result.charAt(1) === 'b'; +}; + +/******************************************************************************/ + +µBlock.isAllowResult = function(result) { + return typeof result !== 'string' || result.charAt(1) !== 'b'; +}; +/******************************************************************************/ + })(); \ No newline at end of file