Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Delta Between Two Patch Sets: safari/include.youtube.js

Issue 29338491: Issue 3823 - Split up message responder code (Closed)
Left Patch Set: Don't check for instance of Promise, avoid creating unnecessary arays Created March 21, 2016, 1:25 p.m.
Right Patch Set: Moved get-domain-enabled-state to whitelisting module Created March 22, 2016, 8:22 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Right: Side by side diff | Download
« no previous file with change/comment | « popup.js ('k') | no next file » | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
(no file at all)
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
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 })();
LEFTRIGHT
« popup.js ('k') | no next file » | Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Toggle Comments ('s')

Powered by Google App Engine
This is Rietveld