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 574 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
585 for (var i = 0; i < windows.length; i++) | 585 for (var i = 0; i < windows.length; i++) |
586 { | 586 { |
587 windows[i].getAllTabs(function(tabs) | 587 windows[i].getAllTabs(function(tabs) |
588 { | 588 { |
589 tabs.forEach(refreshIconAndContextMenu); | 589 tabs.forEach(refreshIconAndContextMenu); |
590 }); | 590 }); |
591 } | 591 } |
592 }); | 592 }); |
593 | 593 |
594 // Update icon if a tab changes location | 594 // Update icon if a tab changes location |
595 ext.tabs.onBeforeNavigate.addListener(function(tab) | 595 ext.tabs.onLoading.addListener(function(tab) |
596 { | 596 { |
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 |