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-2015 Eyeo GmbH | 3 * Copyright (C) 2006-2015 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 1737 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1748 else | 1748 else |
1749 { | 1749 { |
1750 let {addBottomBar, removeBottomBar, getBrowser} = require("appSupport"); | 1750 let {addBottomBar, removeBottomBar, getBrowser} = require("appSupport"); |
1751 let mustDetach = !addBottomBar || !removeBottomBar || !("abp-bottombar-con
tainer" in this.overlay); | 1751 let mustDetach = !addBottomBar || !removeBottomBar || !("abp-bottombar-con
tainer" in this.overlay); |
1752 let detach = mustDetach || Prefs.detachsidebar; | 1752 let detach = mustDetach || Prefs.detachsidebar; |
1753 if (!detach && window.document.getElementById("abp-bottombar")) | 1753 if (!detach && window.document.getElementById("abp-bottombar")) |
1754 { | 1754 { |
1755 removeBottomBar(window); | 1755 removeBottomBar(window); |
1756 | 1756 |
1757 let browser = (getBrowser ? getBrowser(window) : null); | 1757 let browser = (getBrowser ? getBrowser(window) : null); |
| 1758 if (browser && "selectedBrowser" in browser) |
| 1759 browser = browser.selectedBrowser; |
1758 if (browser) | 1760 if (browser) |
1759 browser.contentWindow.focus(); | 1761 browser.focus(); |
1760 } | 1762 } |
1761 else if (!detach) | 1763 else if (!detach) |
1762 { | 1764 { |
1763 addBottomBar(window, this.overlay["abp-bottombar-container"]); | 1765 addBottomBar(window, this.overlay["abp-bottombar-container"]); |
1764 let element = window.document.getElementById("abp-bottombar"); | 1766 let element = window.document.getElementById("abp-bottombar"); |
1765 if (element) | 1767 if (element) |
1766 { | 1768 { |
1767 element.setAttribute("width", Prefs.blockableItemsSize.width); | 1769 element.setAttribute("width", Prefs.blockableItemsSize.width); |
1768 element.setAttribute("height", Prefs.blockableItemsSize.height); | 1770 element.setAttribute("height", Prefs.blockableItemsSize.height); |
1769 | 1771 |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1896 ["abp-command-contribute-hide", "command", UI.hideContributeButton.bind(UI)], | 1898 ["abp-command-contribute-hide", "command", UI.hideContributeButton.bind(UI)], |
1897 ["abp-command-toggleshownotifications", "command", Notification.toggleIgnoreCa
tegory.bind(Notification, "*", null)] | 1899 ["abp-command-toggleshownotifications", "command", Notification.toggleIgnoreCa
tegory.bind(Notification, "*", null)] |
1898 ]; | 1900 ]; |
1899 | 1901 |
1900 onShutdown.add(function() | 1902 onShutdown.add(function() |
1901 { | 1903 { |
1902 for (let window of UI.applicationWindows) | 1904 for (let window of UI.applicationWindows) |
1903 if (UI.isBottombarOpen(window)) | 1905 if (UI.isBottombarOpen(window)) |
1904 UI.toggleBottombar(window); | 1906 UI.toggleBottombar(window); |
1905 }); | 1907 }); |
OLD | NEW |