OLD | NEW |
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: function(param) |
18 { | 18 { |
19 matches: function(param) {return true} | 19 return {matches: function(param) {return true;}} |
20 } | 20 } |
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) |
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 })(); |
OLD | NEW |