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: Use polyfill for addEventListener Created July 2, 2014, 8:40 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 { 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 })();
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