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-2017 eyeo GmbH | 3 * Copyright (C) 2006-2017 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 26 matching lines...) Expand all Loading... |
37 panel.onShown.addListener(window => | 37 panel.onShown.addListener(window => |
38 { | 38 { |
39 panelWindow = window; | 39 panelWindow = window; |
40 }); | 40 }); |
41 | 41 |
42 panel.onHidden.addListener(window => | 42 panel.onHidden.addListener(window => |
43 { | 43 { |
44 panelWindow = null; | 44 panelWindow = null; |
45 }); | 45 }); |
46 | 46 |
47 panel.onSearch.addListener((eventName, queryString) => | 47 if (panel.onSearch) |
48 { | 48 { |
49 if (panelWindow) | 49 panel.onSearch.addListener((eventName, queryString) => |
50 panelWindow.postMessage({type: eventName, queryString}, "*"); | 50 { |
51 }); | 51 if (panelWindow) |
| 52 panelWindow.postMessage({type: eventName, queryString}, "*"); |
| 53 }); |
| 54 } |
52 } | 55 } |
53 ); | 56 ); |
54 } | 57 } |
55 } | 58 } |
56 ); | 59 ); |
OLD | NEW |