1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-10-04 16:47:15 +02:00
This commit is contained in:
gorhill 2017-05-28 12:21:56 -04:00
parent b91f7abcb7
commit d50e76745d
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2
3 changed files with 3 additions and 17 deletions

View File

@ -2,7 +2,7 @@
"manifest_version": 2,
"name": "uBlock Origin",
"version": "1.12.5.13",
"version": "1.12.5.14",
"commands": {
"launch-element-zapper": {

View File

@ -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 };

View File

@ -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();