| 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 { | 57 { |
| 58 browser.runtime.sendMessage({ | 58 browser.runtime.sendMessage({ |
| 59 type: "app.get", | 59 type: "app.get", |
| 60 what: "senderId" | 60 what: "senderId" |
| 61 }).then(tabId => browser.tabs.remove(tabId)); | 61 }).then(tabId => browser.tabs.remove(tabId)); |
| 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: "composer.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 popupAlreadyClosed: true, |
| 73 remove: (typeof success == "boolean" ? success : false) | 73 remove: (typeof success == "boolean" ? success : false) |
| 74 } | 74 } |
| 75 }); | 75 }); |
| 76 closeMe(); | 76 closeMe(); |
| 77 } | 77 } |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 break; | 113 break; |
| 114 case "composer.dialog.close": | 114 case "composer.dialog.close": |
| 115 closeMe(); | 115 closeMe(); |
| 116 break; | 116 break; |
| 117 } | 117 } |
| 118 }); | 118 }); |
| 119 | 119 |
| 120 window.removeEventListener("load", init); | 120 window.removeEventListener("load", init); |
| 121 } | 121 } |
| 122 window.addEventListener("load", init, false); | 122 window.addEventListener("load", init, false); |
| OLD | NEW |