Left: | ||
Right: |
LEFT | RIGHT |
---|---|
1 var AdblockPlus = (function() | 1 var AdblockPlus = (function() |
2 { | 2 { |
3 var scopes = | 3 var scopes = |
4 { | 4 { |
5 prefs: | 5 prefs: |
6 { | 6 { |
7 Prefs: {documentation_link: ""} | 7 Prefs: {documentation_link: ""} |
8 }, | 8 }, |
9 utils: | 9 utils: |
10 { | 10 { |
11 Utils: {appLocale: ""} | 11 Utils: {appLocale: ""} |
12 }, | 12 }, |
13 filterClasses: | 13 filterClasses: |
14 { | 14 { |
15 Filter: | 15 Filter: |
16 { | 16 { |
17 fromText: | 17 fromText: |
18 { | 18 { |
19 matches: function(param) {return true} | 19 matches: function(param) {return true} |
20 } | 20 } |
Felix Dahlke
2014/07/16 11:05:17
Indentation is still off here :P
| |
21 } | 21 } |
22 } | 22 } |
23 }; | 23 }; |
24 | 24 |
25 var result = | 25 var result = |
26 { | 26 { |
27 require: function(module) | 27 require: function(module) |
28 { | 28 { |
29 return scopes[module]; | 29 return scopes[module]; |
30 } | 30 } |
31 }; | 31 }; |
32 | 32 |
33 window.addEventListener("load", function() | 33 window.addEventListener("load", function() |
34 { | 34 { |
35 result.getMessage = function(section, param) | 35 result.getMessage = function(section, param) |
Felix Dahlke
2014/07/16 11:05:17
Simpler:
result.getMessage = Settings.GetMessage;
Oleksandr
2014/07/16 11:19:41
This doesn't work. Settings.GetMessage is a method
Felix Dahlke
2014/07/18 12:43:36
Oh :P
| |
36 { | 36 { |
37 return Settings.GetMessage(section, param); | 37 return Settings.GetMessage(section, param); |
38 } | 38 } |
39 scopes.prefs.Prefs.documentation_link = Settings.GetDocumentationLink(); | 39 scopes.prefs.Prefs.documentation_link = Settings.GetDocumentationLink(); |
40 scopes.utils.Utils.appLocale = Settings.GetAppLocale(); | 40 scopes.utils.Utils.appLocale = Settings.GetAppLocale(); |
41 }, false); | 41 }, false); |
42 | 42 |
43 return result; | 43 return result; |
44 })(); | 44 })(); |
LEFT | RIGHT |