Left: | ||
Right: |
LEFT | RIGHT |
---|---|
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 17 matching lines...) Expand all Loading... | |
28 { | 28 { |
29 type: "prefs.get", | 29 type: "prefs.get", |
30 key: "show_devtools_panel" | 30 key: "show_devtools_panel" |
31 }, | 31 }, |
32 enabled => | 32 enabled => |
33 { | 33 { |
34 if (enabled) | 34 if (enabled) |
35 { | 35 { |
36 browser.devtools.panels.create( | 36 browser.devtools.panels.create( |
37 "Adblock Plus", | 37 "Adblock Plus", |
38 "icons/abp-16.png", | 38 "icons/abp-32.png", |
Wladimir Palant
2017/11/17 12:35:41
This API apparently accepts one icon size only, th
kzar
2017/11/17 14:22:25
You're right, 32px doesn't look quite as good on m
| |
39 "devtools-panel.html", | 39 "devtools-panel.html", |
40 panel => | 40 panel => |
41 { | 41 { |
42 panel.onShown.addListener(window => | 42 panel.onShown.addListener(window => |
43 { | 43 { |
44 panelWindow = window; | 44 panelWindow = window; |
45 }); | 45 }); |
46 | 46 |
47 panel.onHidden.addListener(window => | 47 panel.onHidden.addListener(window => |
48 { | 48 { |
49 panelWindow = null; | 49 panelWindow = null; |
50 }); | 50 }); |
51 | 51 |
52 if (panel.onSearch) | 52 if (panel.onSearch) |
53 { | 53 { |
54 panel.onSearch.addListener((eventName, queryString) => | 54 panel.onSearch.addListener((eventName, queryString) => |
55 { | 55 { |
56 if (panelWindow) | 56 if (panelWindow) |
57 panelWindow.postMessage({type: eventName, queryString}, "*"); | 57 panelWindow.postMessage({type: eventName, queryString}, "*"); |
58 }); | 58 }); |
59 } | 59 } |
60 } | 60 } |
61 ); | 61 ); |
62 } | 62 } |
63 } | 63 } |
64 ); | 64 ); |
65 } | 65 } |
LEFT | RIGHT |