LEFT | RIGHT |
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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 { | 43 { |
44 this._icons.set(page, icon); | 44 this._icons.set(page, icon); |
45 | 45 |
46 if (this._animatedPages.has(page)) | 46 if (this._animatedPages.has(page)) |
47 this._updateIcon(page); | 47 this._updateIcon(page); |
48 }, | 48 }, |
49 _start: function() | 49 _start: function() |
50 { | 50 { |
51 this._interval = setInterval(function() | 51 this._interval = setInterval(function() |
52 { | 52 { |
53 ext.pages.query({active: true, visibleWindow: true}, function(pages) | 53 ext.pages.query({active: true}, function(pages) |
54 { | 54 { |
55 if (pages.length == 0) | 55 if (pages.length == 0) |
56 return; | 56 return; |
57 | 57 |
58 for (var i = 0; i < pages.length; i++) | 58 for (var i = 0; i < pages.length; i++) |
59 this._animatedPages.set(pages[i], null); | 59 this._animatedPages.set(pages[i], null); |
60 | 60 |
61 var interval = setInterval(function() | 61 var interval = setInterval(function() |
62 { | 62 { |
63 this._step++; | 63 this._step++; |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 | 98 |
99 if (this._step < 10) | 99 if (this._step < 10) |
100 suffix += "-" + this._step; | 100 suffix += "-" + this._step; |
101 | 101 |
102 path = path.replace(/(?=\..+$)/, suffix); | 102 path = path.replace(/(?=\..+$)/, suffix); |
103 } | 103 } |
104 | 104 |
105 page.browserAction.setIcon(path); | 105 page.browserAction.setIcon(path); |
106 } | 106 } |
107 }; | 107 }; |
LEFT | RIGHT |