diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2020-02-22 15:22:42 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-22 15:22:42 -0500 |
commit | 897f2360be13db70ff2f533089ba8d38b0b744ed (patch) | |
tree | fdfdc9ed13fb38117e922d27c60616f159a2c63e /ext/mixed | |
parent | f8f03f3af0ab031cc58bf5ad3f782c8d45137430 (diff) | |
parent | 6513a15b3b5fd8586226c8823e2680478b97e132 (diff) |
Merge pull request #363 from toasted-nutbread/eslint-stylistic-rules
Eslint stylistic rules
Diffstat (limited to 'ext/mixed')
-rw-r--r-- | ext/mixed/js/audio.js | 2 | ||||
-rw-r--r-- | ext/mixed/js/core.js | 6 | ||||
-rw-r--r-- | ext/mixed/js/text-scanner.js | 22 |
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) { |