LEFT | RIGHT |
1 /* | 1 /* |
2 * This file is part of Adblock Plus <http://adblockplus.org/>, | 2 * This file is part of Adblock Plus <http://adblockplus.org/>, |
3 * Copyright (C) 2006-2014 Eyeo GmbH | 3 * Copyright (C) 2006-2014 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 1276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1287 this.fillContentContextMenu(popup); | 1287 this.fillContentContextMenu(popup); |
1288 } | 1288 } |
1289 else if (popup.id == "abp-tooltip") | 1289 else if (popup.id == "abp-tooltip") |
1290 this.fillIconTooltip(event, popup.ownerDocument.defaultView); | 1290 this.fillIconTooltip(event, popup.ownerDocument.defaultView); |
1291 else | 1291 else |
1292 { | 1292 { |
1293 let match = /^(abp-(toolbar|status|menuitem)-)popup$/.exec(popup.id); | 1293 let match = /^(abp-(toolbar|status|menuitem)-)popup$/.exec(popup.id); |
1294 if (match) | 1294 if (match) |
1295 { | 1295 { |
1296 let [, prefix, name] = match; | 1296 let [, prefix, name] = match; |
| 1297 let window = popup.ownerDocument.defaultView; |
1297 if (name == "toolbar" || name == "status") | 1298 if (name == "toolbar" || name == "status") |
1298 { | 1299 { |
1299 let window = popup.ownerDocument.defaultView; | |
1300 let browser = window.document.getElementById(prefix + "popup-browser")
; | 1300 let browser = window.document.getElementById(prefix + "popup-browser")
; |
1301 browser.setAttribute("src", "chrome://adblockplus/content/ui/popup.htm
l"); | 1301 browser.setAttribute("src", "chrome://adblockplus/content/ui/popup.htm
l"); |
1302 } | 1302 } |
1303 else | 1303 else |
1304 this.fillIconMenu(event, popup.ownerDocument.defaultView, match[1]); | 1304 this.fillIconMenu(event, window, prefix); |
1305 } | 1305 } |
1306 } | 1306 } |
1307 }, | 1307 }, |
1308 | 1308 |
1309 /** | 1309 /** |
1310 * Called when some pop-up in the application window is being hidden | 1310 * Called when some pop-up in the application window is being hidden |
1311 */ | 1311 */ |
1312 onPopupHiding: function(/**Event*/ event) | 1312 onPopupHiding: function(/**Event*/ event) |
1313 { | 1313 { |
1314 if (event.defaultPrevented) | 1314 if (event.defaultPrevented) |
(...skipping 663 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1978 ["abp-command-contribute", "command", UI.openContributePage.bind(UI)], | 1978 ["abp-command-contribute", "command", UI.openContributePage.bind(UI)], |
1979 ["abp-command-contribute-hide", "command", UI.hideContributeButton.bind(UI)] | 1979 ["abp-command-contribute-hide", "command", UI.hideContributeButton.bind(UI)] |
1980 ]; | 1980 ]; |
1981 | 1981 |
1982 onShutdown.add(function() | 1982 onShutdown.add(function() |
1983 { | 1983 { |
1984 for (let window in UI.applicationWindows) | 1984 for (let window in UI.applicationWindows) |
1985 if (UI.isBottombarOpen(window)) | 1985 if (UI.isBottombarOpen(window)) |
1986 UI.toggleBottombar(window); | 1986 UI.toggleBottombar(window); |
1987 }); | 1987 }); |
LEFT | RIGHT |