mirror of https://github.com/gorhill/uBlock.git
Add support for `!#if false` in list directive processor
To more easily comment out blocks of filters.
This commit is contained in:
parent
e0fd9750d4
commit
1d805fb9da
|
@ -957,8 +957,10 @@
|
|||
if ( target ) { expr = expr.slice(1); }
|
||||
const token = this.processDirectives.tokens.get(expr);
|
||||
const startDiscard =
|
||||
token === 'false' &&
|
||||
target === false ||
|
||||
token !== undefined &&
|
||||
vAPI.webextFlavor.soup.has(token) === target;
|
||||
vAPI.webextFlavor.soup.has(token) === target;
|
||||
if ( discard === false && startDiscard ) {
|
||||
parts.push(content.slice(beg, match.index));
|
||||
discard = true;
|
||||
|
@ -995,7 +997,8 @@
|
|||
[ 'env_mobile', 'mobile' ],
|
||||
[ 'env_safari', 'safari' ],
|
||||
[ 'cap_html_filtering', 'html_filtering' ],
|
||||
[ 'cap_user_stylesheet', 'user_stylesheet' ]
|
||||
[ 'cap_user_stylesheet', 'user_stylesheet' ],
|
||||
[ 'false', 'false' ],
|
||||
]);
|
||||
|
||||
/******************************************************************************/
|
||||
|
|
Loading…
Reference in New Issue