Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: background.js

Issue 6528746257383424: Issue 1708 - Integrate first-run page changes in Chrome/Opera/Safari (Closed)
Patch Set: Addressed comment Created Dec. 19, 2014, 7:37 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
OLDNEW
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 549 matching lines...) Expand 10 before | Expand all | Expand 10 after
560 break; 560 break;
561 case "forward": 561 case "forward":
562 if (sender.page) 562 if (sender.page)
563 { 563 {
564 sender.page.sendMessage(msg.payload, sendResponse); 564 sender.page.sendMessage(msg.payload, sendResponse);
565 // Return true to indicate that we want to call 565 // Return true to indicate that we want to call
566 // sendResponse asynchronously 566 // sendResponse asynchronously
567 return true; 567 return true;
568 } 568 }
569 break; 569 break;
570 default:
571 sendResponse({});
572 break;
573 } 570 }
574 }); 571 });
575 572
576 // update icon when page changes location 573 // update icon when page changes location
577 ext.pages.onLoading.addListener(function(page) 574 ext.pages.onLoading.addListener(function(page)
578 { 575 {
579 page.sendMessage({type: "clickhide-deactivate"}); 576 page.sendMessage({type: "clickhide-deactivate"});
580 refreshIconAndContextMenu(page); 577 refreshIconAndContextMenu(page);
581 }); 578 });
582 579
583 setTimeout(function() 580 setTimeout(function()
584 { 581 {
585 var notificationToShow = Notification.getNextToShow(); 582 var notificationToShow = Notification.getNextToShow();
586 if (notificationToShow) 583 if (notificationToShow)
587 showNotification(notificationToShow); 584 showNotification(notificationToShow);
588 }, 3 * 60 * 1000); 585 }, 3 * 60 * 1000);
OLDNEW
« .hgsubstate ('K') | « .hgsubstate ('k') | chrome/ext/background.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld