| 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-present eyeo GmbH | 3 * Copyright (C) 2006-present 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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 frames["" + opacity + whitelisted] = imageData; | 137 frames["" + opacity + whitelisted] = imageData; |
| 138 } | 138 } |
| 139 } | 139 } |
| 140 | 140 |
| 141 return frames; | 141 return frames; |
| 142 }); | 142 }); |
| 143 } | 143 } |
| 144 | 144 |
| 145 function animateIcon(notificationType, frames) | 145 function animateIcon(notificationType, frames) |
| 146 { | 146 { |
| 147 ext.pages.query({active: true}, pages => | 147 chrome.tabs.query({active: true}, tabs => |
| 148 { | 148 { |
| 149 let pages = tabs.map(tab => new ext.Page(tab)); |
| 150 |
| 149 let animationStep = 0; | 151 let animationStep = 0; |
| 150 let opacity = 0; | 152 let opacity = 0; |
| 151 | 153 |
| 152 let onActivated = page => | 154 let onActivated = page => |
| 153 { | 155 { |
| 154 pages.push(page); | 156 pages.push(page); |
| 155 setIcon(page, notificationType, opacity, frames); | 157 setIcon(page, notificationType, opacity, frames); |
| 156 }; | 158 }; |
| 157 ext.pages.onActivated.addListener(onActivated); | 159 ext.pages.onActivated.addListener(onActivated); |
| 158 | 160 |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 clearInterval(interval); | 230 clearInterval(interval); |
| 229 resolve(); | 231 resolve(); |
| 230 return; | 232 return; |
| 231 } | 233 } |
| 232 | 234 |
| 233 animateIcon(type, frames); | 235 animateIcon(type, frames); |
| 234 }, 10000); | 236 }, 10000); |
| 235 }); | 237 }); |
| 236 }); | 238 }); |
| 237 }; | 239 }; |
| OLD | NEW |