| Left: | ||
| Right: |
| 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(/.*?:\/\//, '||')); |
|
Thomas Greiner
2014/09/30 11:10:53
Nit: Use double instead of single quotation marks
Wladimir Palant
2014/10/01 18:00:45
It makes sense to use the same regular expression
Sebastian Noack
2014/10/01 18:10:55
Done.
Sebastian Noack
2014/10/01 18:10:55
Done.
| |
| 395 selectorList.push(elt.localName + '[src="' + elt.getAttribute("src") + '"]') ; | 395 selectorList.push(elt.localName + '[src="' + elt.getAttribute("src") + '"]') ; |
|
Wladimir Palant
2014/10/01 18:00:45
Please remove this line, your previous patch did t
Sebastian Noack
2014/10/01 18:10:55
How do you mean? I didn't add this line, I just fi
Wladimir Palant
2014/10/01 18:26:51
As mentioned before, a hiding filter based on the
Sebastian Noack
2014/10/01 18:33:16
We don't generate a filer here. This list is only
| |
| 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 |
| 405 highlightElements(selectorList.join(",")); | 405 highlightElements(selectorList.join(",")); |
| (...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 625 | 625 |
| 626 clickHide_deactivate(); | 626 clickHide_deactivate(); |
| 627 } | 627 } |
| 628 break; | 628 break; |
| 629 default: | 629 default: |
| 630 sendResponse({}); | 630 sendResponse({}); |
| 631 break; | 631 break; |
| 632 } | 632 } |
| 633 }); | 633 }); |
| 634 } | 634 } |
| OLD | NEW |