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

Unified Diff: lib/snippets.js

Issue 29865583: Issue 6886 - Return snippet filters instead of just scripts (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore/
Patch Set: rename it getFiltersForDomain Created Aug. 27, 2018, 12:13 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 | « no previous file | test/snippets.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/snippets.js
===================================================================
--- a/lib/snippets.js
+++ b/lib/snippets.js
@@ -56,28 +56,28 @@
* @param {SnippetFilter} filter
*/
remove(filter)
{
filters.delete(filter.text);
},
/**
- * Returns a list of all scripts active on a particular domain
+ * Returns a list of all snippet filters active on a particular domain
* @param {string} domain
- * @return {string[]}
+ * @return {Filter[]}
*/
- getScriptsForDomain(domain)
+ getSnippetsForDomain(domain)
{
let result = [];
for (let text of filters)
{
let filter = Filter.fromText(text);
if (filter.isActiveOnDomain(domain))
- result.push(filter.script);
+ result.push(filter);
}
return result;
}
};
exports.Snippets = Snippets;
/**
« no previous file with comments | « no previous file | test/snippets.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld