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

Unified Diff: i18n.js

Issue 29573735: Issue 4580 - Replace ext.backgroundPage.sendMessage with runtime.sendMessage (Closed) Base URL: https://hg.adblockplus.org/adblockplusui/
Patch Set: Created Oct. 11, 2017, 3:37 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
« ext/content.js ('K') | « firstRun.js ('k') | mobile-options.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: i18n.js
===================================================================
--- a/i18n.js
+++ b/i18n.js
@@ -16,17 +16,17 @@
*/
"use strict";
// Getting UI locale cannot be done synchronously on Firefox,
// requires messaging the background page. For Chrome and Safari,
// we could get the UI locale here, but would need to duplicate
// the logic implemented in Utils.appLocale.
-ext.backgroundPage.sendMessage(
+chrome.runtime.sendMessage(
{
type: "app.get",
what: "localeInfo"
},
(localeInfo) =>
{
document.documentElement.lang = localeInfo.locale;
document.documentElement.dir = localeInfo.bidiDir;
« ext/content.js ('K') | « firstRun.js ('k') | mobile-options.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld