mirror of https://github.com/gorhill/uBlock.git
fix #2658
This commit is contained in:
parent
b91f7abcb7
commit
d50e76745d
|
@ -2,7 +2,7 @@
|
|||
"manifest_version": 2,
|
||||
|
||||
"name": "uBlock Origin",
|
||||
"version": "1.12.5.13",
|
||||
"version": "1.12.5.14",
|
||||
|
||||
"commands": {
|
||||
"launch-element-zapper": {
|
||||
|
|
|
@ -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 };
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue