| OLD | NEW |
| 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 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 384 var selector = elementClasses.map(function(elClass) | 384 var selector = elementClasses.map(function(elClass) |
| 385 { | 385 { |
| 386 return "." + elClass.replace(/([^\w-])/, "\\$1"); | 386 return "." + elClass.replace(/([^\w-])/, "\\$1"); |
| 387 }).join(""); | 387 }).join(""); |
| 388 | 388 |
| 389 clickHideFilters.push(document.domain + "##" + selector); | 389 clickHideFilters.push(document.domain + "##" + selector); |
| 390 selectorList.push(selector); | 390 selectorList.push(selector); |
| 391 } | 391 } |
| 392 if (url) | 392 if (url) |
| 393 { | 393 { |
| 394 clickHideFilters.push(url); | 394 clickHideFilters.push(url.replace(/^[\w\-]+:\/+(?:www\.)?/, "||")); |
| 395 selectorList.push('[src="' + elt.getAttribute("src") + '"]'); | 395 selectorList.push('[src="' + elt.getAttribute("src") + '"]'); |
| 396 } | 396 } |
| 397 | 397 |
| 398 // Show popup | 398 // Show popup |
| 399 clickHide_showDialog(e.clientX, e.clientY, clickHideFilters); | 399 clickHide_showDialog(e.clientX, e.clientY, clickHideFilters); |
| 400 | 400 |
| 401 // Highlight the unlucky elements | 401 // Highlight the unlucky elements |
| 402 // Restore currentElement's box-shadow and bgcolor so that highlightElements w
on't save those | 402 // Restore currentElement's box-shadow and bgcolor so that highlightElements w
on't save those |
| 403 unhighlightElement(currentElement); | 403 unhighlightElement(currentElement); |
| 404 // Highlight the elements specified by selector in yellow | 404 // Highlight the elements specified by selector in yellow |
| (...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 624 break; | 624 break; |
| 625 default: | 625 default: |
| 626 sendResponse({}); | 626 sendResponse({}); |
| 627 break; | 627 break; |
| 628 } | 628 } |
| 629 }); | 629 }); |
| 630 | 630 |
| 631 if (window == window.top) | 631 if (window == window.top) |
| 632 ext.backgroundPage.sendMessage({type: "report-html-page"}); | 632 ext.backgroundPage.sendMessage({type: "report-html-page"}); |
| 633 } | 633 } |
| OLD | NEW |