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

Side by Side Diff: qunit/common.js

Issue 29371763: Issue 4795 - Use modern JavaScript syntax (Closed)
Patch Set: Undo accidental whitespace change Created Jan. 16, 2017, 2:57 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
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-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 "use strict";
18 19
19 importAll("filterClasses", this); 20 importAll("filterClasses", this);
20 importAll("subscriptionClasses", this); 21 importAll("subscriptionClasses", this);
21 importAll("matcher", this); 22 importAll("matcher", this);
22 importAll("filterStorage", this); 23 importAll("filterStorage", this);
23 importAll("filterNotifier", this); 24 importAll("filterNotifier", this);
24 importAll("elemHide", this); 25 importAll("elemHide", this);
25 importAll("prefs", this); 26 importAll("prefs", this);
26 importAll("utils", this); 27 importAll("utils", this);
27 28
28 function prepareFilterComponents(keepListeners) 29 function prepareFilterComponents(keepListeners)
29 { 30 {
30 FilterStorage.subscriptions = []; 31 FilterStorage.subscriptions = [];
31 FilterStorage.knownSubscriptions = Object.create(null); 32 FilterStorage.knownSubscriptions = Object.create(null);
32 Subscription.knownSubscriptions = Object.create(null); 33 Subscription.knownSubscriptions = Object.create(null);
33 Filter.knownFilters = Object.create(null); 34 Filter.knownFilters = Object.create(null);
34 35
35 defaultMatcher.clear(); 36 defaultMatcher.clear();
36 ElemHide.clear(); 37 ElemHide.clear();
37 } 38 }
38 39
39 function restoreFilterComponents() 40 function restoreFilterComponents()
40 { 41 {
41 } 42 }
42 43
43 function preparePrefs() 44 function preparePrefs()
44 { 45 {
45 this._pbackup = Object.create(null); 46 this._pbackup = Object.create(null);
46 for (var pref in Prefs) 47 for (let pref in Prefs)
47 { 48 {
48 var value = Prefs[pref]; 49 let value = Prefs[pref];
49 this._pbackup[pref] = value; 50 this._pbackup[pref] = value;
50 } 51 }
51 Prefs.enabled = true; 52 Prefs.enabled = true;
52 } 53 }
53 54
54 function restorePrefs() 55 function restorePrefs()
55 { 56 {
56 for (var pref in this._pbackup) 57 for (let pref in this._pbackup)
57 Prefs[pref] = this._pbackup[pref]; 58 Prefs[pref] = this._pbackup[pref];
58 } 59 }
59 60
60 function executeFirstRunActions() 61 function executeFirstRunActions()
61 { 62 {
62 } 63 }
OLDNEW

Powered by Google App Engine
This is Rietveld