Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: lib/appSupport.js

Issue 5643346198396928: Issue 2260 - Replaced some more for..in loops with for..of fixing the UI (Closed)
Patch Set: Created April 2, 2015, 5:39 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | lib/ui.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | lib/ui.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld