mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-11 09:31:01 +01:00
minor code review: remove pointless test
This commit is contained in:
parent
3ec9377c3e
commit
6ab34efe44
1 changed files with 3 additions and 3 deletions
|
@ -601,7 +601,7 @@ var filterDocument = (function() {
|
|||
) {
|
||||
return false;
|
||||
}
|
||||
// We need to insert after DOCTYPE, or else the browser may falls into
|
||||
// We need to insert after DOCTYPE, or else the browser may fall into
|
||||
// quirks mode.
|
||||
if ( responseBytes.byteLength < 256 ) { return false; }
|
||||
var bb = new Uint8Array(responseBytes, 0, 256),
|
||||
|
@ -612,7 +612,7 @@ var filterDocument = (function() {
|
|||
for (;;) {
|
||||
b = bb[i++];
|
||||
if ( b === 0x3C /* '<' */ ) { break; }
|
||||
if ( b > 0x20 || b > 0x7F || i > 240 ) { return false; }
|
||||
if ( b > 0x20 || i > 240 ) { return false; }
|
||||
}
|
||||
// Case insensitively test for '!doctype'.
|
||||
if (
|
||||
|
@ -633,7 +633,7 @@ var filterDocument = (function() {
|
|||
b = bb[i++];
|
||||
if ( b === 0x3E /* '>' */ ) { break; }
|
||||
if ( b === 0x22 /* '"' */ || b === 0x27 /* "'" */ ) { qcount += 1; }
|
||||
if ( b > 127 || i > 240 ) { return false; }
|
||||
if ( b > 0x7F || i > 240 ) { return false; }
|
||||
}
|
||||
// Bail out if mismatched quotes.
|
||||
if ( (qcount & 1) !== 0 ) { return false; }
|
||||
|
|
Loading…
Reference in a new issue