mirror of
https://github.com/gorhill/uBlock.git
synced 2024-10-06 09:37:12 +02:00
Disallow -abp-...
filters if not using #?#
Related feedback: - https://github.com/uBlockOrigin/uBlock-issues/issues/2435#issuecomment-1367805459
This commit is contained in:
parent
3c9ad16359
commit
72dabcac66
@ -1536,7 +1536,6 @@ Parser.prototype.SelectorCompiler = class {
|
|||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( head ) {
|
if ( head ) {
|
||||||
if ( args ) {
|
if ( args ) {
|
||||||
this.astFlatten(head.data, args);
|
this.astFlatten(head.data, args);
|
||||||
@ -1548,7 +1547,9 @@ Parser.prototype.SelectorCompiler = class {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( data.type !== 'PseudoClassSelector' ) { return; }
|
if ( data.type !== 'PseudoClassSelector' ) { return; }
|
||||||
|
if ( data.name.startsWith('-abp-') && this.asProcedural === false ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
// Post-analysis, mind:
|
// Post-analysis, mind:
|
||||||
// - https://w3c.github.io/csswg-drafts/selectors-4/#has-pseudo
|
// - https://w3c.github.io/csswg-drafts/selectors-4/#has-pseudo
|
||||||
// - https://w3c.github.io/csswg-drafts/selectors-4/#negation
|
// - https://w3c.github.io/csswg-drafts/selectors-4/#negation
|
||||||
|
Loading…
Reference in New Issue
Block a user