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

Commit

Permalink
instrumentation to uninstall addon
Browse files Browse the repository at this point in the history
  • Loading branch information
andrenatal committed Jan 29, 2021
1 parent 8c0dea4 commit 9f69b56
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ deploy:
on:
repo: mozilla/voicefill
tags: true
branch: 1.4.5
branch: 1.4.7
notifications:
slack:
on_success: always
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Voice Fill Changelog

## [1.4.7] - 2021-01-27
- EOL for VoiceFill. Thanks to all our users!

## [1.4.5] - 2020-05-19
### Added
- Permission settings to allow Mozilla to store the audio samples
Expand Down
25 changes: 24 additions & 1 deletion extension/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,32 @@ const analytics = new TestPilotGA({
ds: 'addon',
an: 'Voice Fill',
aid: '[email protected]',
av: '1.4.5'
av: '1.4.7'
});

// self-uninstall
let today = new Date();
let uninstall_date = new Date(2021, 1, 19);

const openDiscourse = () => {
browser.tabs.create({
url: "https://discourse.mozilla.org/t/retiring-the-voice-fill-and-firefox-voice-beta-extensions/74581"
});
}

if (!localStorage.getItem("openDiscourse")) {
openDiscourse();
localStorage.setItem("openDiscourse", 1);
}

// uninstall on Feb 19
if (today >= uninstall_date) {
openDiscourse();
browser.management.uninstallSelf({
showConfirmDialog: false
});
}

browser.runtime.onMessage.addListener(event => {
console.log('[metrics] Event successfully sent. Calling analytics.');

Expand Down
2 changes: 1 addition & 1 deletion extension/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"manifest_version": 2,
"name": "Voice Fill",
"version": "1.4.5",
"version": "1.4.7",
"description": "Adds voice input to popular search pages in Firefox. Learn more about Voice Fill at https://testpilot.firefox.com",
"developer": {
"name": "Emerging Technologies Advanced Dev Team",
Expand Down
17 changes: 9 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "voicefill",
"id": "[email protected]",
"description": "This is a simple WebExtension that adds support to use Speech To Text as an input method in web pages.",
"version": "1.4.5",
"version": "1.4.7",
"author": {
"name": "Andre Natal & Fabrice Desré",
"url": "https://github.com/mozilla/voicefill"
Expand All @@ -11,13 +11,13 @@
"url": "https://github.com/mozilla/voicefill/issues"
},
"devDependencies": {
"eslint": "^5.7.0",
"eslint-plugin-mozilla": "^0.16.1",
"eslint-plugin-no-unsanitized": "^3.0.2",
"eslint": "^5.16.0",
"eslint-plugin-mozilla": "^0.16.3",
"eslint-plugin-no-unsanitized": "^3.1.4",
"markdown": "^0.5.0",
"npm-run-all": "^4.1.3",
"prettier": "^1.14.3",
"web-ext": "^2.9.1"
"npm-run-all": "^4.1.5",
"prettier": "^1.19.1",
"web-ext": "^5.5.0"
},
"dependencies": {
"bodymovin": "^4.13.0",
Expand All @@ -39,6 +39,7 @@
"lint:js": "eslint extension",
"once": "web-ext run -s extension",
"package": "npm run build && mv web-ext-artifacts/*.zip addon.xpi",
"postinstall": "bin/postinstall.sh"
"postinstall": "bin/postinstall.sh",
"start:firefox": "web-ext run --source-dir extension/"
}
}

0 comments on commit 9f69b56

Please sign in to comment.