summaryrefslogtreecommitdiff
path: root/ext/mixed/js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/mixed/js')
-rw-r--r--ext/mixed/js/audio.js2
-rw-r--r--ext/mixed/js/core.js6
-rw-r--r--ext/mixed/js/text-scanner.js22
3 files changed, 14 insertions, 16 deletions
diff --git a/ext/mixed/js/audio.js b/ext/mixed/js/audio.js
index fe5982dd..b5a025be 100644
--- a/ext/mixed/js/audio.js
+++ b/ext/mixed/js/audio.js
@@ -54,7 +54,6 @@ class TextToSpeechAudio {
speechSynthesis.cancel();
speechSynthesis.speak(this._utterance);
-
} catch (e) {
// NOP
}
@@ -82,7 +81,6 @@ class TextToSpeechAudio {
return new TextToSpeechAudio(text, voice);
}
-
}
function audioGetFromUrl(url, willDownload) {
diff --git a/ext/mixed/js/core.js b/ext/mixed/js/core.js
index 330a30fb..83813796 100644
--- a/ext/mixed/js/core.js
+++ b/ext/mixed/js/core.js
@@ -160,9 +160,9 @@ function promiseTimeout(delay, resolveValue) {
const resolve = (value) => complete(promiseResolve, value);
const reject = (value) => complete(promiseReject, value);
- const promise = new Promise((resolve, reject) => {
- promiseResolve = resolve;
- promiseReject = reject;
+ const promise = new Promise((resolve2, reject2) => {
+ promiseResolve = resolve2;
+ promiseReject = reject2;
});
timer = window.setTimeout(() => {
timer = null;
diff --git a/ext/mixed/js/text-scanner.js b/ext/mixed/js/text-scanner.js
index db3835cf..ff0eac8b 100644
--- a/ext/mixed/js/text-scanner.js
+++ b/ext/mixed/js/text-scanner.js
@@ -141,18 +141,18 @@ class TextScanner {
const textSourceCurrentPrevious = this.textSourceCurrent !== null ? this.textSourceCurrent.clone() : null;
this.searchAt(primaryTouch.clientX, primaryTouch.clientY, 'touchStart')
- .then(() => {
- if (
- this.textSourceCurrent === null ||
- this.textSourceCurrent.equals(textSourceCurrentPrevious)
- ) {
- return;
- }
+ .then(() => {
+ if (
+ this.textSourceCurrent === null ||
+ this.textSourceCurrent.equals(textSourceCurrentPrevious)
+ ) {
+ return;
+ }
- this.preventScroll = true;
- this.preventNextContextMenu = true;
- this.preventNextMouseDown = true;
- });
+ this.preventScroll = true;
+ this.preventNextContextMenu = true;
+ this.preventNextMouseDown = true;
+ });
}
onTouchEnd(e) {