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

Side by Side Diff: html/static/js/ieFirstRun.js

Issue 4859491858251776: Fix the approach used in ieFirstRun.js (Closed)
Patch Set: Formatting nit addressed Created July 16, 2014, 11:19 a.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 | « html/static/js/ieEventListenerPolyfill.js ('k') | html/templates/firstRun.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 var AdblockPlus = { 1 var AdblockPlus = (function()
2 require: function(param) 2 {
3 var scopes =
4 {
5 prefs:
3 { 6 {
4 if (param == "prefs") 7 Prefs: {documentation_link: ""}
8 },
9 utils:
10 {
11 Utils: {appLocale: ""}
12 },
13 filterClasses:
14 {
15 Filter:
16 {
17 fromText:
5 { 18 {
6 return { 19 matches: function(param) {return true}
7 Prefs:
8 {
9 documentation_link: ""
10 }
11 }
12 } 20 }
13 if (param == "utils") 21 }
14 {
15 return {
16 Utils:
17 {
18 appLocale: ""
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 var result =
43 { 26 {
44 AdblockPlus.getMessage = function(section, param) 27 require: function(module)
45 { 28 {
46 return window.Settings.GetMessage(section, param); 29 return scopes[module];
47 } 30 }
48 Prefs.documentation_link = window.Settings.GetDocumentationLink(); 31 };
49 Utils.appLocale = window.Settings.GetAppLocale(); 32
50 } 33 window.addEventListener("load", function()
34 {
35 result.getMessage = function(section, param)
36 {
37 return Settings.GetMessage(section, param);
38 }
39 scopes.prefs.Prefs.documentation_link = Settings.GetDocumentationLink();
40 scopes.utils.Utils.appLocale = Settings.GetAppLocale();
41 }, false);
42
43 return result;
44 })();
OLDNEW
« no previous file with comments | « html/static/js/ieEventListenerPolyfill.js ('k') | html/templates/firstRun.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld