OLD | NEW |
1 /* | 1 /* |
2 * This file is part of Adblock Plus <https://adblockplus.org/>, | 2 * This file is part of Adblock Plus <https://adblockplus.org/>, |
3 * Copyright (C) 2006-2015 Eyeo GmbH | 3 * Copyright (C) 2006-2015 Eyeo GmbH |
4 * | 4 * |
5 * Adblock Plus is free software: you can redistribute it and/or modify | 5 * Adblock Plus is free software: you can redistribute it and/or modify |
6 * it under the terms of the GNU General Public License version 3 as | 6 * it under the terms of the GNU General Public License version 3 as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
8 * | 8 * |
9 * Adblock Plus is distributed in the hope that it will be useful, | 9 * Adblock Plus is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 14 matching lines...) Expand all Loading... |
25 | 25 |
26 $("#addButton").click(addFilters); | 26 $("#addButton").click(addFilters); |
27 $("#cancelButton").click(closeDialog.bind(null, false)); | 27 $("#cancelButton").click(closeDialog.bind(null, false)); |
28 | 28 |
29 // Apply jQuery UI styles | 29 // Apply jQuery UI styles |
30 $("button").button(); | 30 $("button").button(); |
31 | 31 |
32 ext.backgroundPage.sendMessage( | 32 ext.backgroundPage.sendMessage( |
33 { | 33 { |
34 type: "forward", | 34 type: "forward", |
| 35 expectsResponse: true, |
35 payload: | 36 payload: |
36 { | 37 { |
37 type: "clickhide-init", | 38 type: "clickhide-init", |
38 width: Math.max(document.body.offsetWidth || document.body.scrollWidth), | 39 width: Math.max(document.body.offsetWidth || document.body.scrollWidth), |
39 height: Math.max(document.body.offsetHeight || document.body.scrollHeight) | 40 height: Math.max(document.body.offsetHeight || document.body.scrollHeight) |
40 } | 41 } |
41 }, | 42 }, |
42 function(response) | 43 function(response) |
43 { | 44 { |
44 document.getElementById("filters").value = response.filters.join("\n"); | 45 document.getElementById("filters").value = response.filters.join("\n"); |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 ); | 125 ); |
125 dragCoords = [event.screenX, event.screenY]; | 126 dragCoords = [event.screenX, event.screenY]; |
126 } | 127 } |
127 } | 128 } |
128 | 129 |
129 function onDragEnd(event) | 130 function onDragEnd(event) |
130 { | 131 { |
131 onDrag(event); | 132 onDrag(event); |
132 dragCoords = null; | 133 dragCoords = null; |
133 } | 134 } |
OLD | NEW |