Index: block.js |
=================================================================== |
--- a/block.js |
+++ b/block.js |
@@ -68,8 +68,21 @@ |
var filters = document.getElementById("filters").value.split(/[\r\n]+/) |
.map(function(f) {return f.replace(/^\s+/, "").replace(/\s+$/, "");}) |
.filter(function(f) {return f != "";}); |
- ext.backgroundPage.sendMessage({type: "add-filters", filters: filters}); |
- closeDialog(true); |
+ |
+ ext.backgroundPage.sendMessage( |
+ { |
+ type: "add-filters", |
+ filters: filters |
+ }, |
+ |
+ function(response) |
+ { |
+ if (response.status == "ok") |
+ closeDialog(true); |
+ else |
+ alert(response.error); |
Wladimir Palant
2014/11/18 16:35:03
I don't think this message is helpful without indi
Sebastian Noack
2014/11/18 17:42:55
I decided to keep things as simple as possible for
|
+ } |
+ ); |
} |
function closeDialog(success) |