Left: | ||
Right: |
LEFT | RIGHT |
---|---|
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 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
338 var params = elt.querySelectorAll("param[name=\"movie\"]"); | 338 var params = elt.querySelectorAll("param[name=\"movie\"]"); |
339 // This OBJECT could contain an EMBED we already nuked, in which case there' s no URL | 339 // This OBJECT could contain an EMBED we already nuked, in which case there' s no URL |
340 if(params[0]) | 340 if(params[0]) |
341 url = params[0].getAttribute("value"); | 341 url = params[0].getAttribute("value"); |
342 else { | 342 else { |
343 params = elt.querySelectorAll("param[name=\"src\"]"); | 343 params = elt.querySelectorAll("param[name=\"src\"]"); |
344 if(params[0]) | 344 if(params[0]) |
345 url = params[0].getAttribute("value"); | 345 url = params[0].getAttribute("value"); |
346 } | 346 } |
347 | 347 |
348 // Only normalize when the element contains a URL (issue 328.) | |
349 // The URL is not always normalized, so do it here | |
Wladimir Palant
2014/09/22 09:57:03
For reference: this is referring to https://code.g
Thomas Greiner
2014/09/22 13:13:49
Done.
| |
350 if (url) | 348 if (url) |
351 url = normalizeURL(relativeToAbsoluteUrl(url)); | 349 url = normalizeURL(relativeToAbsoluteUrl(url)); |
Sebastian Noack
2014/09/22 13:27:49
I just realized that Chrome preserves slashes in U
Sebastian Noack
2014/09/22 13:37:36
Also unencoded special characters aren't encoded b
Thomas Greiner
2014/09/22 15:08:28
The question is whether we need to have a well-for
Sebastian Noack
2014/09/22 15:25:16
I don't say that the we should strip repeated slas
Sebastian Noack
2014/09/22 15:50:59
Actually using an <iframe> element is notable fast
Wladimir Palant
2014/09/22 17:39:21
That should be because Chrome does some caching of
Sebastian Noack
2014/09/23 09:40:34
Very interesting. So I agree with your point for u
Sebastian Noack
2014/09/25 07:53:18
LGTM. I created a separate issue, for using an <a>
| |
352 } else if(!url) { | 350 } else if(!url) { |
353 url = elt.src || elt.href; | 351 url = elt.src || elt.href; |
354 } | 352 } |
355 return url; | 353 return url; |
356 } | 354 } |
357 | 355 |
358 // This function Copyright (c) 2008 Jeni Tennison, from jquery.uri.js | 356 // This function Copyright (c) 2008 Jeni Tennison, from jquery.uri.js |
359 // and licensed under the MIT license. See jquery-*.min.js for details. | 357 // and licensed under the MIT license. See jquery-*.min.js for details. |
360 function removeDotSegments(u) { | 358 function removeDotSegments(u) { |
361 var r = '', m = []; | 359 var r = '', m = []; |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
559 | 557 |
560 clickHide_deactivate(); | 558 clickHide_deactivate(); |
561 } | 559 } |
562 break; | 560 break; |
563 default: | 561 default: |
564 sendResponse({}); | 562 sendResponse({}); |
565 break; | 563 break; |
566 } | 564 } |
567 }); | 565 }); |
568 } | 566 } |
LEFT | RIGHT |