From d50e76745ddc910ef75632352ee19abac375ce24 Mon Sep 17 00:00:00 2001 From: gorhill Date: Sun, 28 May 2017 12:21:56 -0400 Subject: [PATCH] fix #2658 --- platform/chromium/manifest.json | 2 +- src/js/traffic.js | 6 ++---- src/js/ublock.js | 12 ------------ 3 files changed, 3 insertions(+), 17 deletions(-) diff --git a/platform/chromium/manifest.json b/platform/chromium/manifest.json index cda264066..6635294aa 100644 --- a/platform/chromium/manifest.json +++ b/platform/chromium/manifest.json @@ -2,7 +2,7 @@ "manifest_version": 2, "name": "uBlock Origin", - "version": "1.12.5.13", + "version": "1.12.5.14", "commands": { "launch-element-zapper": { diff --git a/src/js/traffic.js b/src/js/traffic.js index ed4157971..bb6952fcc 100644 --- a/src/js/traffic.js +++ b/src/js/traffic.js @@ -336,7 +336,7 @@ var onBeforeBehindTheSceneRequest = function(details) { pageStore = µb.pageStoreFromTabId(vAPI.noTabId); if ( !pageStore ) { return; } - var result = '', + var result = 0, context = pageStore.createContextFromPage(), requestType = details.type, requestURL = details.url; @@ -376,9 +376,7 @@ var onBeforeBehindTheSceneRequest = function(details) { context.dispose(); // Not blocked - if ( µb.isAllowResult(result) ) { - return; - } + if ( result !== 1 ) { return; } // Blocked return { 'cancel': true }; diff --git a/src/js/ublock.js b/src/js/ublock.js index ae28c1226..924802da7 100644 --- a/src/js/ublock.js +++ b/src/js/ublock.js @@ -479,18 +479,6 @@ var reInvalidHostname = /[^a-z0-9.\-\[\]:]/, /******************************************************************************/ -µBlock.isBlockResult = function(result) { - return typeof result === 'string' && result.charCodeAt(1) === 98 /* 'b' */; -}; - -/******************************************************************************/ - -µBlock.isAllowResult = function(result) { - return typeof result !== 'string' || result.charCodeAt(1) !== 98 /* 'b' */; -}; - -/******************************************************************************/ - µBlock.toggleHostnameSwitch = function(details) { if ( this.hnSwitches.toggleZ(details.name, details.hostname, !!details.deep, details.state) ) { this.saveHostnameSwitches();