Files
tubestation/toolkit/mozapps/extensions/content/update.js
Kris Maglione 0bb74efdf1 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl
2018-01-29 15:20:18 -08:00

25 lines
1021 B
JavaScript

"use strict";
ChromeUtils.import("resource://gre/modules/Services.jsm");
let BRAND_PROPS = "chrome://branding/locale/brand.properties";
let UPDATE_PROPS = "chrome://mozapps/locale/extensions/update.properties";
let appName = Services.strings.createBundle(BRAND_PROPS)
.GetStringFromName("brandShortName");
let bundle = Services.strings.createBundle(UPDATE_PROPS);
let titleText = bundle.formatStringFromName("addonUpdateTitle", [appName], 1);
let messageText = bundle.formatStringFromName("addonUpdateMessage", [appName], 1);
let cancelText = bundle.GetStringFromName("addonUpdateCancelMessage");
let cancelButtonText = bundle.formatStringFromName("addonUpdateCancelButton", [appName], 1);
document.title = titleText;
window.addEventListener("load", e => {
document.getElementById("message").textContent = messageText;
document.getElementById("cancel-message").textContent = cancelText;
document.getElementById("cancel-btn").textContent = cancelButtonText;
window.sizeToContent();
});