update stuff
This commit is contained in:
parent
f796c6fd04
commit
b211aeb41f
17
bg.js
Normal file
17
bg.js
Normal 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})
|
||||
}
|
15
changelog.htm
Normal file
15
changelog.htm
Normal file
@ -0,0 +1,15 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>BC100 Autofill :: Changelog</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>BC100 Autofill has been updated</h1>
|
||||
<h2>New feature since v0.2.1:</h2>
|
||||
<ul>
|
||||
<li>You can now choose which disruption to enter by default</li>
|
||||
</ul>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user