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

Commit 9f69b56

Browse files
committed
instrumentation to uninstall addon
1 parent 8c0dea4 commit 9f69b56

File tree

5 files changed

+38
-11
lines changed

5 files changed

+38
-11
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ deploy:
1515
on:
1616
repo: mozilla/voicefill
1717
tags: true
18-
branch: 1.4.5
18+
branch: 1.4.7
1919
notifications:
2020
slack:
2121
on_success: always

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Voice Fill Changelog
22

3+
## [1.4.7] - 2021-01-27
4+
- EOL for VoiceFill. Thanks to all our users!
5+
36
## [1.4.5] - 2020-05-19
47
### Added
58
- Permission settings to allow Mozilla to store the audio samples

extension/background.js

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,32 @@ const analytics = new TestPilotGA({
99
ds: 'addon',
1010
an: 'Voice Fill',
1111
12-
av: '1.4.5'
12+
av: '1.4.7'
1313
});
1414

15+
// self-uninstall
16+
let today = new Date();
17+
let uninstall_date = new Date(2021, 1, 19);
18+
19+
const openDiscourse = () => {
20+
browser.tabs.create({
21+
url: "https://discourse.mozilla.org/t/retiring-the-voice-fill-and-firefox-voice-beta-extensions/74581"
22+
});
23+
}
24+
25+
if (!localStorage.getItem("openDiscourse")) {
26+
openDiscourse();
27+
localStorage.setItem("openDiscourse", 1);
28+
}
29+
30+
// uninstall on Feb 19
31+
if (today >= uninstall_date) {
32+
openDiscourse();
33+
browser.management.uninstallSelf({
34+
showConfirmDialog: false
35+
});
36+
}
37+
1538
browser.runtime.onMessage.addListener(event => {
1639
console.log('[metrics] Event successfully sent. Calling analytics.');
1740

extension/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"manifest_version": 2,
33
"name": "Voice Fill",
4-
"version": "1.4.5",
4+
"version": "1.4.7",
55
"description": "Adds voice input to popular search pages in Firefox. Learn more about Voice Fill at https://testpilot.firefox.com",
66
"developer": {
77
"name": "Emerging Technologies Advanced Dev Team",

package.json

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "voicefill",
33
44
"description": "This is a simple WebExtension that adds support to use Speech To Text as an input method in web pages.",
5-
"version": "1.4.5",
5+
"version": "1.4.7",
66
"author": {
77
"name": "Andre Natal & Fabrice Desré",
88
"url": "https://github.com/mozilla/voicefill"
@@ -11,13 +11,13 @@
1111
"url": "https://github.com/mozilla/voicefill/issues"
1212
},
1313
"devDependencies": {
14-
"eslint": "^5.7.0",
15-
"eslint-plugin-mozilla": "^0.16.1",
16-
"eslint-plugin-no-unsanitized": "^3.0.2",
14+
"eslint": "^5.16.0",
15+
"eslint-plugin-mozilla": "^0.16.3",
16+
"eslint-plugin-no-unsanitized": "^3.1.4",
1717
"markdown": "^0.5.0",
18-
"npm-run-all": "^4.1.3",
19-
"prettier": "^1.14.3",
20-
"web-ext": "^2.9.1"
18+
"npm-run-all": "^4.1.5",
19+
"prettier": "^1.19.1",
20+
"web-ext": "^5.5.0"
2121
},
2222
"dependencies": {
2323
"bodymovin": "^4.13.0",
@@ -39,6 +39,7 @@
3939
"lint:js": "eslint extension",
4040
"once": "web-ext run -s extension",
4141
"package": "npm run build && mv web-ext-artifacts/*.zip addon.xpi",
42-
"postinstall": "bin/postinstall.sh"
42+
"postinstall": "bin/postinstall.sh",
43+
"start:firefox": "web-ext run --source-dir extension/"
4344
}
4445
}

0 commit comments

Comments
 (0)