1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-11-05 18:32:30 +01:00

fix regression from ba32c6a473

This commit is contained in:
Raymond Hill 2018-09-09 18:08:07 -04:00
parent d0b98e2c41
commit 183caa2782
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2

View File

@ -216,8 +216,8 @@ let fromCosmeticFilter = function(details) {
break;
// Specific cosmetic filtering
case 8:
if ( exception !== ((fargs[1] & 0b01) !== 0) ) { break; }
isProcedural = (fargs[1] & 0b10) !== 0;
if ( exception !== ((fargs[1] & 0b0001) !== 0) ) { break; }
isProcedural = (fargs[1] & 0b0010) !== 0;
if (
isProcedural === false && fargs[3] !== selector ||
isProcedural && JSON.parse(fargs[3]).raw !== selector
@ -230,7 +230,7 @@ let fromCosmeticFilter = function(details) {
break;
// Scriptlet injection
case 32:
if ( exception !== (fargs[1].charAt(0) === '!') ) { break; }
if ( exception !== ((fargs[1] & 0b0001) !== 0) ) { break; }
if ( fargs[3] !== selector ) { break; }
if ( hostnameMatches(fargs[2]) ) {
found = fargs[2] + prefix + selector;
@ -239,7 +239,7 @@ let fromCosmeticFilter = function(details) {
// HTML filtering
case 64: // CSS selector
case 65: // procedural
if ( exception !== (fargs[1].charAt(0) === '!') ) { break; }
if ( exception !== ((fargs[1] & 0b0001) !== 0) ) { break; }
if (
fargs[0] === 64 && fargs[3] !== selector ||
fargs[0] === 65 && JSON.parse(fargs[3]).raw !== selector