From 5aa122e856b80b28dd1d2354e825f9759a173058 Mon Sep 17 00:00:00 2001 From: gorhill Date: Tue, 27 Dec 2016 12:32:52 -0500 Subject: [PATCH] allow lone css selector in :if/:if-not operators --- src/js/cosmetic-filtering.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/js/cosmetic-filtering.js b/src/js/cosmetic-filtering.js index 6d693adb5..666f9dccf 100644 --- a/src/js/cosmetic-filtering.js +++ b/src/js/cosmetic-filtering.js @@ -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],