Index: lib/filterClasses.js |
=================================================================== |
--- a/lib/filterClasses.js |
+++ b/lib/filterClasses.js |
@@ -848,16 +848,29 @@ |
// The "||" prefix requires that the text that follows does not start |
// with a forward slash. |
return index != -1 && location[index] != "/" && |
doubleAnchorRegExp.test(location.substring(0, index)); |
} |
return location.includes(pattern); |
+ }, |
+ |
+ /** |
+ * Checks whether this filter has only a URL pattern and no content type, |
+ * third-party flag, domains, or sitekeys. |
+ * @returns {boolean} |
+ */ |
+ isLocationOnly() |
+ { |
+ return this.contentType == RegExpFilter.prototype.contentType && |
+ this.thirdParty == null && |
+ !this.domainSource && !this.sitekeySource && |
+ !this.domains && !this.sitekeys; |
} |
}); |
/** |
* Yields the filter itself (required to optimize {@link Matcher}). |
* @yields {RegExpFilter} |
*/ |
RegExpFilter.prototype[Symbol.iterator] = function*() |