Index: abp2blocklist.js |
=================================================================== |
--- a/abp2blocklist.js |
+++ b/abp2blocklist.js |
@@ -17,20 +17,23 @@ |
"use strict"; |
let readline = require("readline"); |
let Filter = require("filterClasses").Filter; |
let ContentBlockerList = require("./lib/abp2blocklist.js").ContentBlockerList; |
var rl = readline.createInterface({input: process.stdin, terminal: false}); |
-var blockerList = new ContentBlockerList(); |
+var blockerList = new ContentBlockerList({merge: "all"}); |
rl.on("line", line => |
{ |
if (/^\s*[^\[\s]/.test(line)) |
blockerList.addFilter(Filter.fromText(Filter.normalize(line))); |
}); |
rl.on("close", () => |
{ |
- console.log(JSON.stringify(blockerList.generateRules(), null, "\t")); |
+ blockerList.generateRules().then(rules => |
+ { |
+ console.log(JSON.stringify(rules, null, "\t")); |
+ }); |
}); |