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-present eyeo GmbH | 3 * Copyright (C) 2006-present 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 } | 62 } |
63 | 63 |
64 function closeDialog(success) | 64 function closeDialog(success) |
65 { | 65 { |
66 browser.runtime.sendMessage({ | 66 browser.runtime.sendMessage({ |
67 type: "forward", | 67 type: "forward", |
68 targetPageId, | 68 targetPageId, |
69 payload: | 69 payload: |
70 { | 70 { |
71 type: "composer.content.finished", | 71 type: "composer.content.finished", |
| 72 popupAlreadyClosed: true, |
72 remove: (typeof success == "boolean" ? success : false) | 73 remove: (typeof success == "boolean" ? success : false) |
73 } | 74 } |
74 }); | 75 }); |
75 closeMe(); | 76 closeMe(); |
76 } | 77 } |
77 | 78 |
78 function init() | 79 function init() |
79 { | 80 { |
80 // Attach event listeners | 81 // Attach event listeners |
81 window.addEventListener("keydown", onKeyDown, false); | 82 window.addEventListener("keydown", onKeyDown, false); |
(...skipping 30 matching lines...) Expand all Loading... |
112 break; | 113 break; |
113 case "composer.dialog.close": | 114 case "composer.dialog.close": |
114 closeMe(); | 115 closeMe(); |
115 break; | 116 break; |
116 } | 117 } |
117 }); | 118 }); |
118 | 119 |
119 window.removeEventListener("load", init); | 120 window.removeEventListener("load", init); |
120 } | 121 } |
121 window.addEventListener("load", init, false); | 122 window.addEventListener("load", init, false); |
OLD | NEW |