Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: lib/filterClasses.js

Issue 29464708: Issue 5314 - Allow hide emulation filters to be with a plain selector (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore/
Patch Set: Created June 14, 2017, 3:18 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: lib/filterClasses.js
===================================================================
--- a/lib/filterClasses.js
+++ b/lib/filterClasses.js
@@ -963,20 +963,16 @@
if (type == "?")
{
// Element hiding emulation filters are inefficient so we need to make sure
// that they're only applied if they specify active domains
if (!/,[^~][^,.]*\.[^,]/.test("," + domain))
return new InvalidFilter(text, "filter_elemhideemulation_nodomain");
- // The selector should contain at least one :-abp-foo() pseudo-class
- if (!/:-abp-[\w-]+\(/.test(selector))
- return new InvalidFilter(text, "filter_elemhideemulation_plainselector");
-
return new ElemHideEmulationFilter(text, domain, selector);
}
return new ElemHideFilter(text, domain, selector);
};
/**
* Class for element hiding filters

Powered by Google App Engine
This is Rietveld