| OLD | NEW |
| 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-2016 Eyeo GmbH | 3 * Copyright (C) 2006-2016 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 |
| 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 * GNU General Public License for more details. | 12 * GNU General Public License for more details. |
| 13 * | 13 * |
| 14 * You should have received a copy of the GNU General Public License | 14 * You should have received a copy of the GNU General Public License |
| 15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. | 15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. |
| 16 */ | 16 */ |
| 17 | 17 |
| 18 (function() { | 18 (function() { |
| 19 if (document.domain != "www.youtube.com") | 19 if (document.domain != "www.youtube.com") |
| 20 return; | 20 return; |
| 21 | 21 |
| 22 if (!ext.backgroundPage.sendMessageSync({type: "get-domain-enabled-state"}).en
abled) | 22 if (ext.backgroundPage.sendMessageSync({type: "filters.isPageWhitelisted"})) |
| 23 return; | 23 return; |
| 24 | 24 |
| 25 var badArgumentsRegex = /^((.*_)?(ad|ads|afv|adsense)(_.*)?|(ad3|st)_module|pr
erolls|interstitial|infringe|iv_cta_url)$/; | 25 var badArgumentsRegex = /^((.*_)?(ad|ads|afv|adsense)(_.*)?|(ad3|st)_module|pr
erolls|interstitial|infringe|iv_cta_url)$/; |
| 26 | 26 |
| 27 function rewriteFlashvars(flashvars) | 27 function rewriteFlashvars(flashvars) |
| 28 { | 28 { |
| 29 var pairs = flashvars.split("&"); | 29 var pairs = flashvars.split("&"); |
| 30 for (var i = 0; i < pairs.length; i++) | 30 for (var i = 0; i < pairs.length; i++) |
| 31 if (badArgumentsRegex.test(pairs[i].split("=")[0])) | 31 if (badArgumentsRegex.test(pairs[i].split("=")[0])) |
| 32 pairs.splice(i--, 1); | 32 pairs.splice(i--, 1); |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 config.args = rawConfig.args; | 156 config.args = rawConfig.args; |
| 157 } | 157 } |
| 158 } | 158 } |
| 159 }); | 159 }); |
| 160 | 160 |
| 161 ytplayer.config = rawYtplayer.config; | 161 ytplayer.config = rawYtplayer.config; |
| 162 } | 162 } |
| 163 }); | 163 }); |
| 164 }, badArgumentsRegex); | 164 }, badArgumentsRegex); |
| 165 })(); | 165 })(); |
| OLD | NEW |