Skip to content

Commit

Permalink
Merge pull request #28 from mlsof21/prevent-other-tabs
Browse files Browse the repository at this point in the history
fix capital letter in activation phrase - ms
  • Loading branch information
mlsof21 committed Oct 4, 2022
2 parents eb7480e + 406dfd1 commit 0f3f05a
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 7 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,7 @@
### 1.2.2 - 2022-10-04 - Activation Phrase Fix

- Added fix for capital letter in activation phrase by trimming/lowercasing everywhere

### 1.2.1 - 2022-10-03 - Only in Inventory

- Added fix for loading DIM on another tab. Previously required reloading the page on the inventory tab. Now Voice DIM will load no matter what page is started on
Expand Down
4 changes: 2 additions & 2 deletions package.json
@@ -1,6 +1,6 @@
{
"name": "voice-dim",
"version": "1.2.1",
"version": "1.2.2",
"description": "Perform common DIM actions by using speech recognition.",
"main": "dist/chrome/js/voice-dim.js",
"scripts": {
Expand Down Expand Up @@ -46,4 +46,4 @@
"webpack-cli": "^4.10.0",
"webpack-visualizer-plugin2": "^1.0.0"
}
}
}
2 changes: 1 addition & 1 deletion public/manifest.chrome.json
@@ -1,7 +1,7 @@
{
"name": "Voice DIM",
"description": "Control DIM with your voice.",
"version": "1.2.1",
"version": "1.2.2",
"manifest_version": 3,
"background": {
"service_worker": "js/background.js"
Expand Down
2 changes: 1 addition & 1 deletion public/manifest.firefox.json
@@ -1,7 +1,7 @@
{
"name": "Voice DIM",
"description": "Control DIM with your voice.",
"version": "1.2.1",
"version": "1.2.2",
"manifest_version": 2,
"background": {
"scripts": ["js/background.js"]
Expand Down
4 changes: 2 additions & 2 deletions src/ts/options.ts
Expand Up @@ -48,7 +48,7 @@ function onActivationPhraseChange() {

store<AlwaysListening>('alwaysListening', {
active: listeningToggle.checked,
activationPhrase: activationPhrase.value,
activationPhrase: activationPhrase.value.trim().toLowerCase(),
});
sendListenOptionsMessage();
}
Expand All @@ -61,7 +61,7 @@ function onAlwaysListeningChange(listeningOptions: AlwaysListening) {

store<AlwaysListening>('alwaysListening', {
active: listeningOptions.active,
activationPhrase: listeningOptions.activationPhrase,
activationPhrase: listeningOptions.activationPhrase.trim().toLowerCase(),
});
sendListenOptionsMessage();
}
Expand Down
2 changes: 1 addition & 1 deletion src/ts/voiceDim.ts
Expand Up @@ -519,7 +519,7 @@ function initializeAlwaysListening() {
let actionPerformed = false;
for (let said of userSaid) {
said = said.trim().toLowerCase();
const ap = listeningOptions.activationPhrase;
const ap = listeningOptions.activationPhrase.trim().toLowerCase();
const phrases = [ap];

if (ap.includes('dim')) phrases.push(ap.replace('dim', 'them'));
Expand Down

0 comments on commit 0f3f05a

Please sign in to comment.