Skip to content
This repository was archived by the owner on Feb 26, 2021. It is now read-only.

Commit 0ec2a05

Browse files
committed
Adding code to self-uninstall
1 parent 1c88f88 commit 0ec2a05

3 files changed

Lines changed: 28 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## Version 0.25.0 (2021-01-28)
2+
- EOL for Firefox Voice. Thanks to all users!
3+
14
## Version 0.24.0 (2020-08-05)
25

36
- New wakeword available (if turned on in Firefox Voice options): **Hey Firefox**

extension/background/main.js

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,30 @@ import { focusSearchResults } from "../intents/search/search.js";
1515
import { copyImage } from "../intents/clipboard/clipboard.js";
1616
import { registerHandler, sendMessage } from "../communicate.js";
1717

18+
19+
// self-uninstall
20+
let today = new Date();
21+
let uninstall_date = new Date(2021, 1, 19);
22+
23+
const openDiscourse = () => {
24+
browser.tabs.create({
25+
url: "https://discourse.mozilla.org/t/retiring-the-voice-fill-and-firefox-voice-beta-extensions/74581"
26+
});
27+
}
28+
29+
if (!localStorage.getItem("openDiscourse")) {
30+
openDiscourse();
31+
localStorage.setItem("openDiscourse", 1);
32+
}
33+
34+
// uninstall on Feb 19
35+
if (today >= uninstall_date) {
36+
openDiscourse();
37+
browser.management.uninstallSelf({
38+
showConfirmDialog: false
39+
});
40+
}
41+
1842
// These are used for registering message handlers:
1943
// eslint-disable-next-line no-unused-vars
2044
import * as intentExamples from "./intentExamples.js";

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"id": "firefox-voice@mozilla.org",
44
"description": "This is a WebExtension that allows the browser to be voice-controlled.",
55
"private": true,
6-
"version": "0.24.0",
6+
"version": "0.25.0",
77
"engines": {
88
"node": ">=12.0.0"
99
},

0 commit comments

Comments
 (0)