| Left: | ||
| Right: |
| 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-2015 Eyeo GmbH | 3 * Copyright (C) 2006-2015 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 548 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 559 break; | 559 break; |
| 560 case "forward": | 560 case "forward": |
| 561 if (sender.page) | 561 if (sender.page) |
| 562 { | 562 { |
| 563 sender.page.sendMessage(msg.payload, sendResponse); | 563 sender.page.sendMessage(msg.payload, sendResponse); |
| 564 // Return true to indicate that we want to call | 564 // Return true to indicate that we want to call |
| 565 // sendResponse asynchronously | 565 // sendResponse asynchronously |
| 566 return true; | 566 return true; |
| 567 } | 567 } |
| 568 break; | 568 break; |
| 569 case "clickHide-showDialog": | |
|
Sebastian Noack
2015/01/16 22:45:31
It seems those message types are unnecessary and r
kzar
2015/01/16 23:03:45
Done.
| |
| 570 if (sender.page) | |
| 571 sender.page.sendMessage(msg); | |
| 572 break; | |
| 573 case "clickHide-clear-lastRightClickEvent": | |
| 574 if (sender.page) | |
| 575 sender.page.sendMessage(msg); | |
| 576 break; | |
| 569 } | 577 } |
| 570 }); | 578 }); |
| 571 | 579 |
| 572 // update icon when page changes location | 580 // update icon when page changes location |
| 573 ext.pages.onLoading.addListener(function(page) | 581 ext.pages.onLoading.addListener(function(page) |
| 574 { | 582 { |
| 575 page.sendMessage({type: "clickhide-deactivate"}); | 583 page.sendMessage({type: "clickhide-deactivate"}); |
| 576 refreshIconAndContextMenu(page); | 584 refreshIconAndContextMenu(page); |
| 577 }); | 585 }); |
| 578 | 586 |
| 579 setTimeout(function() | 587 setTimeout(function() |
| 580 { | 588 { |
| 581 var notificationToShow = NotificationStorage.getNextToShow(); | 589 var notificationToShow = NotificationStorage.getNextToShow(); |
| 582 if (notificationToShow) | 590 if (notificationToShow) |
| 583 showNotification(notificationToShow); | 591 showNotification(notificationToShow); |
| 584 }, 3 * 60 * 1000); | 592 }, 3 * 60 * 1000); |
| OLD | NEW |