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

Unified Diff: ext/common.js

Issue 29573083: Issue 5028 - Use browser namespace (Closed) Base URL: https://hg.adblockplus.org/adblockplusui/
Patch Set: Created Oct. 10, 2017, 10:24 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « devtools-panel.js ('k') | firstRun.html » ('j') | polyfill.js » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ext/common.js
===================================================================
--- a/ext/common.js
+++ b/ext/common.js
@@ -14,19 +14,16 @@
* You should have received a copy of the GNU General Public License
* along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>.
*/
"use strict";
(function()
{
- if (typeof chrome == "undefined")
- window.chrome = {};
-
if (typeof ext == "undefined")
window.ext = {};
function Page(source)
{
this._source = source;
}
Page.prototype =
@@ -156,17 +153,17 @@
let rawCatalog = JSON.parse(xhr.responseText);
for (let msgId in rawCatalog)
{
if (!(msgId in catalog))
catalog[msgId] = parseMessage(rawCatalog[msgId]);
}
};
- chrome.i18n = {
+ browser.i18n = {
Sebastian Noack 2017/10/10 23:23:08 I think this code should be moved to polyfill.js n
Manish Jethani 2017/10/11 11:29:06 Done.
getUILanguage()
{
return locales[0].replace(/_/g, "-");
},
getMessage(msgId, substitutions)
{
while (true)
{
« no previous file with comments | « devtools-panel.js ('k') | firstRun.html » ('j') | polyfill.js » ('J')

Powered by Google App Engine
This is Rietveld