1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-11-02 00:42:45 +01:00
This commit is contained in:
gorhill 2015-02-07 22:20:24 -05:00
parent 4c704dba74
commit 6be9a8a9d3
2 changed files with 10 additions and 2 deletions

View File

@ -115,7 +115,7 @@ return {
firstUpdateAfter: 5 * oneMinute, firstUpdateAfter: 5 * oneMinute,
nextUpdateAfter: 7 * oneHour, nextUpdateAfter: 7 * oneHour,
selfieMagic: 'jhigubkbgtws', selfieMagic: 'bizhviclttie',
selfieAfter: 7 * oneMinute, selfieAfter: 7 * oneMinute,
pageStores: {}, pageStores: {},

View File

@ -1382,8 +1382,16 @@ FilterParser.prototype.parseOptType = function(raw, not) {
return; return;
} }
// Negated type: set all valid network request type bits to 1
if ( this.types === 0 ) { if ( this.types === 0 ) {
this.types = (1 << (typeNameToTypeValue.other >>> 4) + 1) - 1; // bring origin to 0 (from 4 -- see typeNameToTypeValue)
// add 2 = number of left shift to use
// left-shift 1 by the above-calculated value
// subtract 4 to set all type bits, *except* for 2 lsb
// https://github.com/gorhill/uBlock/issues/723
// The 2 lsb *must* be zeroed
this.types = (1 << (typeNameToTypeValue.other >>> 4) + 2) - 4;
} }
this.types &= ~(1 << (type >>> 4)); this.types &= ~(1 << (type >>> 4));