| 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 858 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 869 if (Policy.isWhitelisted(location.spec)) | 869 if (Policy.isWhitelisted(location.spec)) |
| 870 UI.removeWhitelist(window); | 870 UI.removeWhitelist(window); |
| 871 else | 871 else |
| 872 UI.toggleFilter(Filter.fromText("@@||" + host + "^$document")); | 872 UI.toggleFilter(Filter.fromText("@@||" + host + "^$document")); |
| 873 }; | 873 }; |
| 874 | 874 |
| 875 let menuItem = null; | 875 let menuItem = null; |
| 876 onShutdown.add(function() | 876 onShutdown.add(function() |
| 877 { | 877 { |
| 878 let window = null; | 878 let window = null; |
| 879 for (window in UI.applicationWindows) | 879 for (window of UI.applicationWindows) |
| 880 break; | 880 break; |
| 881 | 881 |
| 882 if (window && menuItem) | 882 if (window && menuItem) |
| 883 window.NativeWindow.menu.remove(menuItem); | 883 window.NativeWindow.menu.remove(menuItem); |
| 884 }); | 884 }); |
| 885 | 885 |
| 886 UI.updateIconState = function fmn_updateIconState(window, icon) | 886 UI.updateIconState = function fmn_updateIconState(window, icon) |
| 887 { | 887 { |
| 888 if (menuItem !== null) | 888 if (menuItem !== null) |
| 889 { | 889 { |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 951 event.state = {id: require("info").addonID}; | 951 event.state = {id: require("info").addonID}; |
| 952 browser._contentWindow.dispatchEvent(event); | 952 browser._contentWindow.dispatchEvent(event); |
| 953 }); | 953 }); |
| 954 }); | 954 }); |
| 955 }, true); | 955 }, true); |
| 956 }; | 956 }; |
| 957 | 957 |
| 958 break; | 958 break; |
| 959 } | 959 } |
| 960 } | 960 } |
| OLD | NEW |