| 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-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 554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 565 } | 565 } |
| 566 break; | 566 break; |
| 567 case "add-subscription": | 567 case "add-subscription": |
| 568 openOptions(function(tab) | 568 openOptions(function(tab) |
| 569 { | 569 { |
| 570 tab.sendMessage(msg); | 570 tab.sendMessage(msg); |
| 571 }); | 571 }); |
| 572 break; | 572 break; |
| 573 case "forward": | 573 case "forward": |
| 574 if (sender.tab) | 574 if (sender.tab) |
| 575 { |
| 575 sender.tab.sendMessage(msg.payload, sendResponse); | 576 sender.tab.sendMessage(msg.payload, sendResponse); |
| 577 // Return true to indicate that we want to call |
| 578 // sendResponse asynchronously |
| 579 return true; |
| 580 } |
| 576 break; | 581 break; |
| 577 default: | 582 default: |
| 578 sendResponse({}); | 583 sendResponse({}); |
| 579 break; | 584 break; |
| 580 } | 585 } |
| 581 }); | 586 }); |
| 582 | 587 |
| 583 // Show icon as page action for all tabs that already exist | 588 // Show icon as page action for all tabs that already exist |
| 584 ext.windows.getAll(function(windows) | 589 ext.windows.getAll(function(windows) |
| 585 { | 590 { |
| (...skipping 12 matching lines...) Expand all Loading... |
| 598 tab.sendMessage({type: "clickhide-deactivate"}); | 603 tab.sendMessage({type: "clickhide-deactivate"}); |
| 599 refreshIconAndContextMenu(tab); | 604 refreshIconAndContextMenu(tab); |
| 600 }); | 605 }); |
| 601 | 606 |
| 602 setTimeout(function() | 607 setTimeout(function() |
| 603 { | 608 { |
| 604 var notificationToShow = Notification.getNextToShow(); | 609 var notificationToShow = Notification.getNextToShow(); |
| 605 if (notificationToShow) | 610 if (notificationToShow) |
| 606 showNotification(notificationToShow); | 611 showNotification(notificationToShow); |
| 607 }, 3 * 60 * 1000); | 612 }, 3 * 60 * 1000); |
| LEFT | RIGHT |