mirror of
https://github.com/gorhill/uBlock.git
synced 2026-03-11 09:04:36 +00:00
Prevent the creation of non-cosmetic extended filters in element picker
Related issue: - https://github.com/uBlockOrigin/uBlock-issues/issues/2232
This commit is contained in:
parent
86c8023163
commit
44753053c3
1 changed files with 4 additions and 5 deletions
|
|
@ -113,11 +113,10 @@ const filterFromTextarea = function() {
|
|||
const sfp = staticFilteringParser;
|
||||
sfp.analyze(filter);
|
||||
sfp.analyzeExtra();
|
||||
if (
|
||||
sfp.category !== sfp.CATStaticExtFilter &&
|
||||
sfp.category !== sfp.CATStaticNetFilter ||
|
||||
sfp.shouldDiscard()
|
||||
) {
|
||||
if ( sfp.shouldDiscard() ) { return '!'; }
|
||||
if ( sfp.category === sfp.CATStaticExtFilter ) {
|
||||
if ( sfp.hasFlavor(sfp.BITFlavorExtCosmetic) === false ) { return '!'; }
|
||||
} else if ( sfp.category !== sfp.CATStaticNetFilter ) {
|
||||
return '!';
|
||||
}
|
||||
return filter;
|
||||
|
|
|
|||
Loading…
Reference in a new issue