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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 // when using Safari, because icons are grayscale already and icons | 110 // when using Safari, because icons are grayscale already and icons |
111 // aren't per tab in Safari. | 111 // aren't per tab in Safari. |
112 iconFilename = "icons/abp-16.png" | 112 iconFilename = "icons/abp-16.png" |
113 else | 113 else |
114 { | 114 { |
115 var excluded = isWhitelisted(tab.url); | 115 var excluded = isWhitelisted(tab.url); |
116 iconFilename = excluded ? "icons/abp-19-whitelisted.png" : "icons/abp-19.png
"; | 116 iconFilename = excluded ? "icons/abp-19-whitelisted.png" : "icons/abp-19.png
"; |
117 } | 117 } |
118 | 118 |
119 tab.browserAction.setIcon(iconFilename); | 119 tab.browserAction.setIcon(iconFilename); |
120 tab.browserAction.setTitle(ext.i18n.getMessage("name")); | |
121 | |
122 iconAnimation.registerTab(tab, iconFilename); | 120 iconAnimation.registerTab(tab, iconFilename); |
123 | 121 |
124 // Set context menu status according to whether current tab has whitelisted do
main | 122 // Set context menu status according to whether current tab has whitelisted do
main |
125 if (excluded) | 123 if (excluded) |
126 chrome.contextMenus.removeAll(); | 124 chrome.contextMenus.removeAll(); |
127 else | 125 else |
128 showContextMenu(); | 126 showContextMenu(); |
129 } | 127 } |
130 | 128 |
131 /** | 129 /** |
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
429 tab.sendMessage({type: "clickhide-deactivate"}); | 427 tab.sendMessage({type: "clickhide-deactivate"}); |
430 refreshIconAndContextMenu(tab); | 428 refreshIconAndContextMenu(tab); |
431 }); | 429 }); |
432 | 430 |
433 setTimeout(function() | 431 setTimeout(function() |
434 { | 432 { |
435 var notificationToShow = Notification.getNextToShow(); | 433 var notificationToShow = Notification.getNextToShow(); |
436 if (notificationToShow) | 434 if (notificationToShow) |
437 showNotification(notificationToShow); | 435 showNotification(notificationToShow); |
438 }, 3 * 60 * 1000); | 436 }, 3 * 60 * 1000); |
OLD | NEW |