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

Delta Between Two Patch Sets: include.postload.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 | « background.js ('k') | include.preload.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 491 matching lines...) Expand 10 before | Expand all | Expand 10 after
502 e.stopPropagation(); 502 e.stopPropagation();
503 } 503 }
504 } 504 }
505 505
506 function getFiltersForElement(element, callback) 506 function getFiltersForElement(element, callback)
507 { 507 {
508 ext.backgroundPage.sendMessage( 508 ext.backgroundPage.sendMessage(
509 { 509 {
510 type: "compose-filters", 510 type: "compose-filters",
511 tagName: element.localName, 511 tagName: element.localName,
512 attributes: { 512 id: element.id,
513 id: element.id, 513 src: element.getAttribute("src"),
514 src: element.getAttribute("src"), 514 style: element.getAttribute("style"),
515 style: element.getAttribute("style")
516 },
517 classes: [].slice.call(element.classList), 515 classes: [].slice.call(element.classList),
518 urls: getURLsFromElement(element), 516 urls: getURLsFromElement(element),
519 mediatype: typeMap[element.localName], 517 mediatype: typeMap[element.localName],
520 baseURL: document.location.href 518 baseURL: document.location.href
521 }, 519 },
522 function(response) 520 function(response)
523 { 521 {
524 callback(response.filters, response.selectors); 522 callback(response.filters, response.selectors);
525 } 523 }
526 ); 524 );
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
741 lastRightClickEventValid = false; 739 lastRightClickEventValid = false;
742 else 740 else
743 lastRightClickEvent = null; 741 lastRightClickEvent = null;
744 break; 742 break;
745 } 743 }
746 }); 744 });
747 745
748 if (window == window.top) 746 if (window == window.top)
749 ext.backgroundPage.sendMessage({type: "report-html-page"}); 747 ext.backgroundPage.sendMessage({type: "report-html-page"});
750 } 748 }
LEFTRIGHT

Powered by Google App Engine
This is Rietveld