| OLD | NEW | 
|---|
| 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 1058 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1069     if (!icon) | 1069     if (!icon) | 
| 1070       return; | 1070       return; | 
| 1071 | 1071 | 
| 1072     let state = (Prefs.enabled ? "active" : "disabled"); | 1072     let state = (Prefs.enabled ? "active" : "disabled"); | 
| 1073     if (state == "active") | 1073     if (state == "active") | 
| 1074     { | 1074     { | 
| 1075       let location = this.getCurrentLocation(window); | 1075       let location = this.getCurrentLocation(window); | 
| 1076       if (location && Policy.isWhitelisted(location.spec)) | 1076       if (location && Policy.isWhitelisted(location.spec)) | 
| 1077         state = "whitelisted"; | 1077         state = "whitelisted"; | 
| 1078     } | 1078     } | 
| 1079 | 1079 | 
|  | 1080     let popupId = "abp-status-popup"; | 
| 1080     if (icon.localName == "statusbarpanel") | 1081     if (icon.localName == "statusbarpanel") | 
| 1081     { | 1082     { | 
| 1082       if (Prefs.defaultstatusbaraction == 0) | 1083       if (Prefs.defaultstatusbaraction == 0) | 
| 1083         icon.setAttribute("popup", icon.getAttribute("context")); | 1084       { | 
|  | 1085         icon.setAttribute("popup", popupId); | 
|  | 1086         icon.removeAttribute("context"); | 
|  | 1087       } | 
| 1084       else | 1088       else | 
|  | 1089       { | 
| 1085         icon.removeAttribute("popup"); | 1090         icon.removeAttribute("popup"); | 
|  | 1091         icon.setAttribute("context", popupId); | 
|  | 1092       } | 
| 1086     } | 1093     } | 
| 1087     else | 1094     else | 
| 1088     { | 1095     { | 
| 1089       if (Prefs.defaulttoolbaraction == 0) | 1096       if (Prefs.defaulttoolbaraction == 0) | 
|  | 1097       { | 
| 1090         icon.setAttribute("type", "menu"); | 1098         icon.setAttribute("type", "menu"); | 
|  | 1099         icon.removeAttribute("context"); | 
|  | 1100       } | 
| 1091       else | 1101       else | 
|  | 1102       { | 
| 1092         icon.setAttribute("type", "menu-button"); | 1103         icon.setAttribute("type", "menu-button"); | 
|  | 1104         icon.setAttribute("context", popupId); | 
|  | 1105       } | 
| 1093     } | 1106     } | 
| 1094 | 1107 | 
| 1095     icon.setAttribute("abpstate", state); | 1108     icon.setAttribute("abpstate", state); | 
| 1096   }, | 1109   }, | 
| 1097 | 1110 | 
| 1098   /** | 1111   /** | 
| 1099    * Shows or hides status bar icons in all windows, according to pref. | 1112    * Shows or hides status bar icons in all windows, according to pref. | 
| 1100    */ | 1113    */ | 
| 1101   updateStatusbarIcon: function(/**Window*/ window) | 1114   updateStatusbarIcon: function(/**Window*/ window) | 
| 1102   { | 1115   { | 
| (...skipping 817 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1920   ["abp-command-contribute", "command", UI.openContributePage.bind(UI)], | 1933   ["abp-command-contribute", "command", UI.openContributePage.bind(UI)], | 
| 1921   ["abp-command-contribute-hide", "command", UI.hideContributeButton.bind(UI)] | 1934   ["abp-command-contribute-hide", "command", UI.hideContributeButton.bind(UI)] | 
| 1922 ]; | 1935 ]; | 
| 1923 | 1936 | 
| 1924 onShutdown.add(function() | 1937 onShutdown.add(function() | 
| 1925 { | 1938 { | 
| 1926   for (let window in UI.applicationWindows) | 1939   for (let window in UI.applicationWindows) | 
| 1927     if (UI.isBottombarOpen(window)) | 1940     if (UI.isBottombarOpen(window)) | 
| 1928       UI.toggleBottombar(window); | 1941       UI.toggleBottombar(window); | 
| 1929 }); | 1942 }); | 
| OLD | NEW | 
|---|