Index: options.js |
=================================================================== |
--- a/options.js |
+++ b/options.js |
@@ -537,11 +537,19 @@ |
function importRawFiltersText() |
{ |
var text = document.getElementById("rawFiltersText").value; |
- var result = parseFilters(text, true); |
+ var result = parseFilters(text); |
- if (result.error) |
+ var errors = []; |
+ for (var i = 0; i < result.errors.length; i++) |
{ |
- alert(result.error); |
+ var error = result.errors[i]; |
+ if (error.type != "unexpected-filter-list-header") |
+ errors.push(error); |
+ } |
Wladimir Palant
2015/06/08 18:15:47
Why not:
var errors = result.errors.filter(fun
Sebastian Noack
2015/06/08 18:36:46
Done.
|
+ |
+ if (errors.length > 0) |
+ { |
+ alert(errors.join("\n")); |
return; |
} |