1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-10-06 09:37:12 +02:00

allow lone css selector in :if/:if-not operators

This commit is contained in:
gorhill 2016-12-27 12:32:52 -05:00
parent 7558fedc38
commit 5aa122e856

View File

@ -850,7 +850,12 @@ FilterContainer.prototype.compileProceduralSelector = (function() {
var compile = function(raw) {
var matches = reParserEx.exec(raw);
if ( matches === null ) { return; }
if ( matches === null ) {
if ( isValidCSSSelector(raw) ) {
return { selector: raw, tasks: [] };
}
return;
}
var tasks = [],
firstOperand = raw.slice(0, matches.index),
currentOperator = matches[1],