| 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-2016 Eyeo GmbH | 3 * Copyright (C) 2006-2016 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 } | 65 } |
| 66 else | 66 else |
| 67 { | 67 { |
| 68 chrome.browserAction.setIcon({ | 68 chrome.browserAction.setIcon({ |
| 69 tabId: page.id, | 69 tabId: page.id, |
| 70 imageData: frames["" + opacity + whitelisted] | 70 imageData: frames["" + opacity + whitelisted] |
| 71 }); | 71 }); |
| 72 } | 72 } |
| 73 } | 73 } |
| 74 | 74 |
| 75 FilterNotifier.addListener((action, page, filter) => | 75 FilterNotifier.on("page.WhitelistingStateRevalidate", (page, filter) => |
| 76 { | 76 { |
| 77 if (action == "page.WhitelistingStateRevalidate") | 77 whitelistedState.set(page, !!filter); |
| 78 { | 78 if (canUpdateIcon) |
| 79 whitelistedState.set(page, !!filter); | 79 setIcon(page); |
| 80 if (canUpdateIcon) | |
| 81 setIcon(page); | |
| 82 } | |
| 83 }); | 80 }); |
| 84 | 81 |
| 85 function renderFrames(notificationType) | 82 function renderFrames(notificationType) |
| 86 { | 83 { |
| 87 if (safariPlatform) | 84 if (safariPlatform) |
| 88 return Promise.resolve(null); | 85 return Promise.resolve(null); |
| 89 | 86 |
| 90 return Promise.all([ | 87 return Promise.all([ |
| 91 loadImage("icons/abp-19.png"), | 88 loadImage("icons/abp-19.png"), |
| 92 loadImage("icons/abp-19-whitelisted.png"), | 89 loadImage("icons/abp-19-whitelisted.png"), |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 clearInterval(interval); | 210 clearInterval(interval); |
| 214 resolve(); | 211 resolve(); |
| 215 return; | 212 return; |
| 216 } | 213 } |
| 217 | 214 |
| 218 animateIcon(type, frames); | 215 animateIcon(type, frames); |
| 219 }, 10000); | 216 }, 10000); |
| 220 }); | 217 }); |
| 221 }); | 218 }); |
| 222 }; | 219 }; |
| OLD | NEW |