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

Delta Between Two Patch Sets: background.js

Issue 5225119261655040: Issue 1282 - Don't generate filters conflicting with existing exception rules (Closed)
Left Patch Set: Rebased and addressed comments Created March 3, 2015, 2:28 p.m.
Right Patch Set: Addressed comment Created March 3, 2015, 2:59 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « no previous file | include.postload.js » ('j') | lib/filterComposer.js » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
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 535 matching lines...) Expand 10 before | Expand all | Expand 10 after
546 }); 546 });
547 break; 547 break;
548 case "add-sitekey": 548 case "add-sitekey":
549 processKey(msg.token, sender.page, sender.frame); 549 processKey(msg.token, sender.page, sender.frame);
550 break; 550 break;
551 case "report-html-page": 551 case "report-html-page":
552 htmlPages.set(sender.page, null); 552 htmlPages.set(sender.page, null);
553 refreshIconAndContextMenu(sender.page); 553 refreshIconAndContextMenu(sender.page);
554 break; 554 break;
555 case "compose-filters": 555 case "compose-filters":
556 sendResponse(composeFilters( 556 sendResponse(composeFilters({
557 msg.tagName, msg.attributes, msg.classes, msg.urls, 557 tagName: msg.tagName,
558 msg.mediatype, msg.baseURL, sender.page, sender.frame 558 id: msg.id,
559 )); 559 src: msg.src,
560 style: msg.style,
561 classes: msg.classes,
562 urls: msg.urls,
563 type: msg.mediatype,
564 baseURL: msg.baseURL,
565 page: sender.page,
566 frame: sender.frame
567 }));
560 break; 568 break;
561 case "forward": 569 case "forward":
562 if (sender.page) 570 if (sender.page)
563 { 571 {
564 if (msg.expectsResponse) 572 if (msg.expectsResponse)
565 { 573 {
566 sender.page.sendMessage(msg.payload, sendResponse); 574 sender.page.sendMessage(msg.payload, sendResponse);
567 return true; 575 return true;
568 } 576 }
569 577
570 sender.page.sendMessage(msg.payload); 578 sender.page.sendMessage(msg.payload);
571 } 579 }
572 break; 580 break;
573 } 581 }
574 }); 582 });
575 583
576 // update icon when page changes location 584 // update icon when page changes location
577 ext.pages.onLoading.addListener(function(page) 585 ext.pages.onLoading.addListener(function(page)
578 { 586 {
579 page.sendMessage({type: "clickhide-deactivate"}); 587 page.sendMessage({type: "clickhide-deactivate"});
580 refreshIconAndContextMenu(page); 588 refreshIconAndContextMenu(page);
581 }); 589 });
582 590
583 setTimeout(function() 591 setTimeout(function()
584 { 592 {
585 var notificationToShow = NotificationStorage.getNextToShow(); 593 var notificationToShow = NotificationStorage.getNextToShow();
586 if (notificationToShow) 594 if (notificationToShow)
587 showNotification(notificationToShow); 595 showNotification(notificationToShow);
588 }, 3 * 60 * 1000); 596 }, 3 * 60 * 1000);
LEFTRIGHT

Powered by Google App Engine
This is Rietveld