Open landing page on installs

This commit is contained in:
Nils Maier 2019-10-09 18:26:36 +02:00
parent de1b13a50f
commit 856044c88c

View File

@ -152,11 +152,16 @@ runtime.onInstalled.addListener(({reason, previousVersion}: OnInstalled) => {
const {version} = runtime.getManifest();
const major = getMajor(version);
const prevMajor = getMajor(previousVersion);
if (reason === "install" || (reason === "update" && major !== prevMajor)) {
if (reason === "update" && major !== prevMajor) {
tabs.create({
url: `https://about.downthemall.org/changelog/?cur=${major}&prev=${prevMajor}`,
});
}
else if (reason === "install") {
tabs.create({
url: `https://about.downthemall.org/4.0/?cur=${major}`,
});
}
});
locale.then(() => {