Bug 1372310 - Export Screenshots 10.3.0 to Firefox; r=aswan,mossop

--HG--
extra : rebase_source : 81be07cea32674fecbfa096292d105e7f6c6a9b6
This commit is contained in:
Ian Bicking 2017-06-16 15:19:44 -05:00
Родитель 9dde471d5e
Коммит a33d80d6fe
4 изменённых файлов: 12 добавлений и 8 удалений

14
browser/extensions/screenshots/bootstrap.js поставляемый
Просмотреть файл

@ -1,3 +1,4 @@
/* globals ADDON_DISABLE */
const OLD_ADDON_PREF_NAME = "extensions.jid1-NeEaf3sAHdKHPA@jetpack.deviceIdInfo";
const OLD_ADDON_ID = "jid1-NeEaf3sAHdKHPA@jetpack";
const ADDON_ID = "screenshots@mozilla.org";
@ -59,7 +60,10 @@ const appStartupObserver = {
}
const APP_STARTUP = 1;
let startupReason;
function startup(data, reason) { // eslint-disable-line no-unused-vars
startupReason = reason;
if (reason === APP_STARTUP) {
appStartupObserver.register();
} else {
@ -78,7 +82,7 @@ function shutdown(data, reason) { // eslint-disable-line no-unused-vars
resourceURI: addonResourceURI
});
if (webExtension.started) {
stop(webExtension);
stop(webExtension, reason);
}
}
@ -103,12 +107,12 @@ function handleStartup() {
if (!shouldDisable() && !webExtension.started) {
start(webExtension);
} else if (shouldDisable()) {
stop(webExtension);
stop(webExtension, ADDON_DISABLE);
}
}
function start(webExtension) {
webExtension.startup().then((api) => {
webExtension.startup(startupReason).then((api) => {
api.browser.runtime.onMessage.addListener(handleMessage);
}).catch((err) => {
// The startup() promise will be rejected if the webExtension was
@ -121,8 +125,8 @@ function start(webExtension) {
});
}
function stop(webExtension) {
webExtension.shutdown();
function stop(webExtension, reason) {
webExtension.shutdown(reason);
}
function handleMessage(msg, sender, sendReply) {

Просмотреть файл

@ -12,7 +12,7 @@
</Description>
</em:targetApplication>
<em:type>2</em:type>
<em:version>10.1.0</em:version>
<em:version>10.3.0</em:version>
<em:bootstrap>true</em:bootstrap>
<em:homepageURL>https://pageshot.net/</em:homepageURL>
<em:multiprocessCompatible>true</em:multiprocessCompatible>

Просмотреть файл

@ -107,7 +107,7 @@
"message": "Done"
},
"termsAndPrivacyNoticeCloudServices": {
"message": "By using Firefox Screenshots, you agree to the Firefox Cloud Services $TERMSANDPRIVACYNOTICETERMSLINK$ and $TERMSANDPRIVACYNOTICEPRIVACYLINK$.",
"message": "By using Firefox Screenshots, you agree to our $TERMSANDPRIVACYNOTICETERMSLINK$ and $TERMSANDPRIVACYNOTICEPRIVACYLINK$.",
"placeholders": {
"termsandprivacynoticetermslink": {
"content": "$1"

Просмотреть файл

@ -1,7 +1,7 @@
{
"manifest_version": 2,
"name": "Firefox Screenshots",
"version": "10.1.0",
"version": "10.3.0",
"description": "__MSG_addonDescription__",
"author": "__MSG_addonAuthorsList__",
"homepage_url": "https://github.com/mozilla-services/screenshots",