Left: | ||
Right: |
OLD | NEW |
---|---|
1 var AdblockPlus = { | 1 var AdblockPlus = (function() |
2 require: function(param) | 2 { |
3 { | 3 var scopes = { |
4 if (param == "prefs") | 4 prefs: { |
Felix Dahlke
2014/07/04 13:40:32
Opening braces of multi-line object literals shoul
| |
5 { | 5 Prefs: { documentation_link: "" } |
Felix Dahlke
2014/07/04 13:40:32
No space after "{" or before "}" for object litera
| |
6 return { | 6 }, |
7 Prefs: | 7 utils: { |
8 { | 8 Utils: { appLocale: "" } |
Felix Dahlke
2014/07/04 13:40:32
Indentation should be 2 spaces per level.
| |
9 documentation_link: "" | 9 }, |
10 } | 10 filterClasses: { |
11 Filter: { | |
12 fromText: { | |
13 matches: function(param) { return true } | |
11 } | 14 } |
12 } | 15 } |
13 if (param == "utils") | 16 } |
14 { | 17 }; |
15 return { | 18 |
16 Utils: | 19 var result = { |
17 { | 20 require: function(module) { |
18 appLocale: "" | 21 return scopes[module]; |
19 } | |
20 } | |
21 } | |
22 if (param == "filterClasses") | |
23 { | |
24 return { | |
25 Filter: | |
26 { | |
27 fromText: function(param) | |
28 { | |
29 return { | |
30 matches: function(param) { | |
31 return true; | |
32 } | |
33 } | |
34 } | |
35 } | |
36 } | |
37 } | |
38 return {}; | |
39 } | 22 } |
40 } | 23 }; |
41 | 24 |
42 function initWrappers() | 25 window.addEventListener("load", function() |
43 { | 26 { |
44 AdblockPlus.getMessage = function(section, param) | 27 result.getMessage = function(section, param) { |
45 { | 28 return Settings.GetMessage(section, param); |
Felix Dahlke
2014/07/04 13:40:32
Indentation is off here.
| |
46 return window.Settings.GetMessage(section, param); | 29 } |
Felix Dahlke
2014/07/04 13:40:32
Is that trailing whitespace?
| |
47 } | 30 scopes.prefs.Prefs.documentation_link = Settings.GetDocumentationLink(); |
48 Prefs.documentation_link = window.Settings.GetDocumentationLink(); | 31 scopes.utils.Utils.appLocale = Settings.GetAppLocale(); |
49 Utils.appLocale = window.Settings.GetAppLocale(); | 32 }, false); |
50 } | 33 |
34 return result; | |
35 })(); | |
OLD | NEW |