update stuff

This commit is contained in:
iw0
2024-05-01 15:35:24 +02:00
parent f796c6fd04
commit b211aeb41f
2 changed files with 32 additions and 0 deletions

17
bg.js Normal file
View File

@@ -0,0 +1,17 @@
browser.runtime.onInstalled.addListener((ev) => {
if (ev.reason == "update") {
launchInfoPage();
// TODO determine how to launch the page only when there are important changes
} else if (ev.reason == "install") {
browser.runtime.openOptionsPage()
}
})
async function updateIsSignificant(previousVersion) {
const significantUpdates = ["0.1.0", "0.2.0", "0.3.0"];
let currentVersion = (await browser.management.getSelf()).version;
return currentVersion in significantUpdates;
}
function launchInfoPage(){
browser.tabs.create({url: "/changelog.htm", active: false})
}