| 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 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 235 return urls; | 235 return urls; |
| 236 } | 236 } |
| 237 | 237 |
| 238 function getURLsFromMediaElement(element) | 238 function getURLsFromMediaElement(element) |
| 239 { | 239 { |
| 240 var urls = getURLsFromAttributes(element); | 240 var urls = getURLsFromAttributes(element); |
| 241 | 241 |
| 242 for (var i = 0; i < element.children.length; i++) | 242 for (var i = 0; i < element.children.length; i++) |
| 243 { | 243 { |
| 244 var child = element.children[i]; | 244 var child = element.children[i]; |
| 245 if (child.localName != "source" || child.localName != "track") | 245 if (child.localName == "source" || child.localName == "track") |
|
Wladimir Palant
2014/12/08 20:31:09
This should be == rather than !=, right? Currently
Sebastian Noack
2014/12/08 21:12:49
Ouch, you are right. Originally, it was in the for
| |
| 246 urls.push.apply(urls, getURLsFromAttributes(child)); | 246 urls.push.apply(urls, getURLsFromAttributes(child)); |
|
Wladimir Palant
2014/12/08 20:31:09
I think for the <track> element you need to call g
Sebastian Noack
2014/12/08 21:12:49
If I didn't misread the standard, a <track> elemen
Wladimir Palant
2014/12/09 08:27:21
It seems that I indeed misunderstood the standard,
| |
| 247 } | 247 } |
| 248 | 248 |
| 249 if (element.poster) | 249 if (element.poster) |
| 250 urls.push(element.poster); | 250 urls.push(element.poster); |
| 251 | 251 |
| 252 return urls; | 252 return urls; |
| 253 } | 253 } |
| 254 | 254 |
| 255 function getURLsFromElement(element) { | 255 function getURLsFromElement(element) { |
| 256 switch (element.localName) | 256 switch (element.localName) |
| (...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 764 break; | 764 break; |
| 765 default: | 765 default: |
| 766 sendResponse({}); | 766 sendResponse({}); |
| 767 break; | 767 break; |
| 768 } | 768 } |
| 769 }); | 769 }); |
| 770 | 770 |
| 771 if (window == window.top) | 771 if (window == window.top) |
| 772 ext.backgroundPage.sendMessage({type: "report-html-page"}); | 772 ext.backgroundPage.sendMessage({type: "report-html-page"}); |
| 773 } | 773 } |
| LEFT | RIGHT |