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

Unified Diff: lib/filterClasses.js

Issue 5434053851348992: Issue 1282 - Let user-defined filters override filter lists (Closed)
Patch Set: Created Dec. 9, 2014, 1:12 p.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
« no previous file with comments | « lib/elemHide.js ('k') | lib/matcher.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/filterClasses.js
===================================================================
--- a/lib/filterClasses.js
+++ b/lib/filterClasses.js
@@ -49,6 +49,19 @@
subscriptions: null,
/**
+ * Whether this is a user-defined filter
+ * @type Boolean
+ */
+ get isUserDefined()
+ {
+ let {SpecialSubscription} = require("subscriptionClasses");
+ let isUserDefined = this.subscriptions.some(s => s instanceof SpecialSubscription);
+
+ Object.defineProperty(this, "isUserDefined", {value: isUserDefined});
+ return isUserDefined;
+ },
+
+ /**
* Serializes the filter to an array of strings for writing out on the disk.
* @param {Array of String} buffer buffer to push the serialization results into
*/
« no previous file with comments | « lib/elemHide.js ('k') | lib/matcher.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld