Index: block.js |
=================================================================== |
--- a/block.js |
+++ b/block.js |
@@ -24,7 +24,7 @@ |
window.addEventListener("dragend", onDragEnd, false); |
$("#addButton").click(addFilters); |
- $("#cancelButton").click(closeDialog.bind(null, false)); |
+ $("#cancelButton").click(closeDialog.bind(null, false, [])); |
// Apply jQuery UI styles |
$("button").button(); |
@@ -54,7 +54,7 @@ |
if (event.keyCode == 27) |
{ |
event.preventDefault(); |
- closeDialog(); |
+ closeDialog(false, []); |
} |
else if (event.keyCode == 13 && !event.shiftKey && !event.ctrlKey) |
{ |
@@ -74,14 +74,14 @@ |
function(response) |
{ |
if (response.status == "ok") |
- closeDialog(true); |
+ closeDialog(true, response.selectors); |
else |
alert(response.error); |
} |
); |
} |
-function closeDialog(success) |
+function closeDialog(success, selectors) |
{ |
ext.backgroundPage.sendMessage( |
{ |
@@ -89,7 +89,8 @@ |
payload: |
{ |
type: "clickhide-close", |
- remove: (typeof success == "boolean" ? success : false) |
+ remove: (typeof success == "boolean" ? success : false), |
+ selectors: selectors |
} |
} |
); |