| LEFT | RIGHT |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| LEFT | RIGHT |