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

Side by Side Diff: lib/utils.js

Issue 5485735259930624: Issue 2066 - Get rid of non-standard __defineGetter__, __defineSetter__, and __lookupGetter__ (Closed)
Patch Set: Created March 1, 2015, 1:14 p.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 | « lib/prefs.js ('k') | qunit/common.js » ('j') | qunit/common.js » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * This file is part of Adblock Plus <https://adblockplus.org/>, 2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-2015 Eyeo GmbH 3 * Copyright (C) 2006-2015 Eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 } 64 }
65 65
66 if (runAsyncQueue) 66 if (runAsyncQueue)
67 runAsyncQueue.push(callback); 67 runAsyncQueue.push(callback);
68 else 68 else
69 window.setTimeout(callback, 0); 69 window.setTimeout(callback, 0);
70 }, 70 },
71 get appLocale() 71 get appLocale()
72 { 72 {
73 var locale = ext.i18n.getMessage("@@ui_locale").replace(/_/g, "-"); 73 var locale = ext.i18n.getMessage("@@ui_locale").replace(/_/g, "-");
74 this.__defineGetter__("appLocale", function() {return locale}); 74 Object.defineProperty(this, "appLocale", {value: locale, enumerable: true});
75 return this.appLocale; 75 return this.appLocale;
76 }, 76 },
77 generateChecksum: function(lines) 77 generateChecksum: function(lines)
78 { 78 {
79 // We cannot calculate MD5 checksums yet :-( 79 // We cannot calculate MD5 checksums yet :-(
80 return null; 80 return null;
81 }, 81 },
82 makeURI: function(url) 82 makeURI: function(url)
83 { 83 {
84 return Services.io.newURI(url); 84 return Services.io.newURI(url);
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 { 140 {
141 var Prefs = require("prefs").Prefs; 141 var Prefs = require("prefs").Prefs;
142 var docLink = Prefs.documentation_link; 142 var docLink = Prefs.documentation_link;
143 return docLink.replace(/%LINK%/g, linkID).replace(/%LANG%/g, Utils.appLocale ); 143 return docLink.replace(/%LINK%/g, linkID).replace(/%LANG%/g, Utils.appLocale );
144 }, 144 },
145 145
146 yield: function() 146 yield: function()
147 { 147 {
148 } 148 }
149 }; 149 };
OLDNEW
« no previous file with comments | « lib/prefs.js ('k') | qunit/common.js » ('j') | qunit/common.js » ('J')

Powered by Google App Engine
This is Rietveld