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

Side by Side Diff: lib/content/elemHideEmulation.js

Issue 29460576: Issue 5079 - Turn elemHideEmulation into a CommonJS module (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore/
Patch Set: Created June 9, 2017, 5:08 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | test/browser/elemHideEmulation.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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-2017 eyeo GmbH 3 * Copyright (C) 2006-2017 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 /* eslint-env browser */
kzar 2017/06/12 12:50:13 Why is this necessary?
hub 2017/06/12 13:26:33 The mistake here is that I should have the proper
kzar 2017/06/12 13:35:12 Sorry, but I still don't understand why it's neces
hub 2017/06/12 14:03:14 This change is gone in the current version of the
kzar 2017/06/12 14:12:44 Right now I understand, previously this file was i
hub 2017/06/12 15:21:50 This is now totally gone in the current patch sinc
18 /* globals filterToRegExp */ 19 /* globals filterToRegExp */
19 20
20 "use strict"; 21 "use strict";
21 22
22 const abpSelectorRegexp = /:-abp-([\w-]+)\(/i; 23 const abpSelectorRegexp = /:-abp-([\w-]+)\(/i;
23 24
24 function splitSelector(selector) 25 function splitSelector(selector)
25 { 26 {
26 if (selector.indexOf(",") == -1) 27 if (selector.indexOf(",") == -1)
27 return [selector]; 28 return [selector];
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 446
446 if (this.patterns.length > 0) 447 if (this.patterns.length > 0)
447 { 448 {
448 let {document} = this.window; 449 let {document} = this.window;
449 this.addSelectors(document.styleSheets); 450 this.addSelectors(document.styleSheets);
450 document.addEventListener("load", this.onLoad.bind(this), true); 451 document.addEventListener("load", this.onLoad.bind(this), true);
451 } 452 }
452 }); 453 });
453 } 454 }
454 }; 455 };
456
457 if (typeof exports != "undefined")
kzar 2017/06/12 12:50:13 Don't we expect exports to always exist like for t
hub 2017/06/12 13:26:34 Sadly no, we can't expect that yet. -in the tests
kzar 2017/06/12 13:35:12 Ah right, well I think we need to fix that at the
hub 2017/06/12 14:03:13 agreed.
kzar 2017/07/07 13:42:20 After reading through this review again I think re
hub 2017/08/10 14:46:21 Acknowledged.
458 {
459 exports.ElemHideEmulation = ElemHideEmulation;
460 exports.splitSelector = splitSelector;
461 }
OLDNEW
« no previous file with comments | « no previous file | test/browser/elemHideEmulation.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld