| 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-2013 Eyeo GmbH | 3 * Copyright (C) 2006-2013 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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 // There is no grayscale version of the icon for whitelisted tabs | 121 // There is no grayscale version of the icon for whitelisted tabs |
| 122 // when using Safari, because icons are grayscale already and icons | 122 // when using Safari, because icons are grayscale already and icons |
| 123 // aren't per tab in Safari. | 123 // aren't per tab in Safari. |
| 124 iconFilename = "icons/abp-16.png" | 124 iconFilename = "icons/abp-16.png" |
| 125 else | 125 else |
| 126 { | 126 { |
| 127 var excluded = isWhitelisted(tab.url); | 127 var excluded = isWhitelisted(tab.url); |
| 128 iconFilename = excluded ? "icons/abp-19-whitelisted.png" : "icons/abp-19.png
"; | 128 iconFilename = excluded ? "icons/abp-19-whitelisted.png" : "icons/abp-19.png
"; |
| 129 } | 129 } |
| 130 | 130 |
| 131 tab.pageAction.setIcon(iconFilename); | 131 tab.browserAction.setIcon(iconFilename); |
| 132 tab.pageAction.setTitle(ext.i18n.getMessage("name")); | 132 tab.browserAction.setTitle(ext.i18n.getMessage("name")); |
| 133 | 133 |
| 134 iconAnimation.registerTab(tab, iconFilename); | 134 iconAnimation.registerTab(tab, iconFilename); |
| 135 | 135 |
| 136 if (localStorage.shouldShowIcon == "false") | 136 if (localStorage.shouldShowIcon == "false") |
| 137 tab.pageAction.hide(); | 137 tab.browserAction.hide(); |
| 138 else | 138 else |
| 139 tab.pageAction.show(); | 139 tab.browserAction.show(); |
| 140 | 140 |
| 141 if (require("info").platform == "chromium") // TODO: Implement context menus f
or Safari | 141 if (require("info").platform == "chromium") // TODO: Implement context menus f
or Safari |
| 142 // Set context menu status according to whether current tab has whitelisted
domain | 142 // Set context menu status according to whether current tab has whitelisted
domain |
| 143 if (excluded) | 143 if (excluded) |
| 144 chrome.contextMenus.removeAll(); | 144 chrome.contextMenus.removeAll(); |
| 145 else | 145 else |
| 146 showContextMenu(); | 146 showContextMenu(); |
| 147 } | 147 } |
| 148 | 148 |
| 149 /** | 149 /** |
| (...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 597 tab.sendMessage({type: "clickhide-deactivate"}); | 597 tab.sendMessage({type: "clickhide-deactivate"}); |
| 598 refreshIconAndContextMenu(tab); | 598 refreshIconAndContextMenu(tab); |
| 599 }); | 599 }); |
| 600 | 600 |
| 601 setTimeout(function() | 601 setTimeout(function() |
| 602 { | 602 { |
| 603 var notificationToShow = Notification.getNextToShow(); | 603 var notificationToShow = Notification.getNextToShow(); |
| 604 if (notificationToShow) | 604 if (notificationToShow) |
| 605 showNotification(notificationToShow); | 605 showNotification(notificationToShow); |
| 606 }, 3 * 60 * 1000); | 606 }, 3 * 60 * 1000); |
| OLD | NEW |