summaryrefslogtreecommitdiff
path: root/ext/js/display/display-audio.js
diff options
context:
space:
mode:
authorJames Maa <jmaa@berkeley.edu>2024-05-31 08:06:52 -0700
committerGitHub <noreply@github.com>2024-05-31 15:06:52 +0000
commit76ca08bd59f0e8bfa1bb20ac813f48e7ab241265 (patch)
treebdba43d9ba704885383c7f308c6fe3f574c647c5 /ext/js/display/display-audio.js
parentb3f54747eb2694bdc90bce72e5532e99d374ef08 (diff)
Allow trailing commas in ESLint (#1013)
* Update comma-dangle rule * Fix dangling commas
Diffstat (limited to 'ext/js/display/display-audio.js')
-rw-r--r--ext/js/display/display-audio.js16
1 files changed, 8 insertions, 8 deletions
diff --git a/ext/js/display/display-audio.js b/ext/js/display/display-audio.js
index d19a448c..c7e08ffe 100644
--- a/ext/js/display/display-audio.js
+++ b/ext/js/display/display-audio.js
@@ -60,7 +60,7 @@ export class DisplayAudio {
['text-to-speech', 'Text-to-speech'],
['text-to-speech-reading', 'Text-to-speech (Kana reading)'],
['custom', 'Custom URL'],
- ['custom-json', 'Custom URL (JSON)']
+ ['custom-json', 'Custom URL (JSON)'],
]);
/** @type {(event: MouseEvent) => void} */
this._onAudioPlayButtonClickBind = this._onAudioPlayButtonClick.bind(this);
@@ -85,10 +85,10 @@ export class DisplayAudio {
/* eslint-disable @stylistic/no-multi-spaces */
this._display.hotkeyHandler.registerActions([
['playAudio', this._onHotkeyActionPlayAudio.bind(this)],
- ['playAudioFromSource', this._onHotkeyActionPlayAudioFromSource.bind(this)]
+ ['playAudioFromSource', this._onHotkeyActionPlayAudioFromSource.bind(this)],
]);
this._display.registerDirectMessageHandlers([
- ['displayAudioClearAutoPlayTimer', this._onMessageClearAutoPlayTimer.bind(this)]
+ ['displayAudioClearAutoPlayTimer', this._onMessageClearAutoPlayTimer.bind(this)],
]);
/* eslint-enable @stylistic/no-multi-spaces */
this._display.on('optionsUpdated', this._onOptionsUpdated.bind(this));
@@ -172,7 +172,7 @@ export class DisplayAudio {
const requiredAudioSources = new Set([
'jpod101',
'jpod101-alternate',
- 'jisho'
+ 'jisho',
]);
/** @type {Map<string, import('display-audio').AudioSource[]>} */
const nameMap = new Map();
@@ -297,7 +297,7 @@ export class DisplayAudio {
downloadable,
name,
nameIndex,
- nameUnique: (nameIndex === 0)
+ nameUnique: (nameIndex === 0),
};
entries.push(source);
@@ -369,7 +369,7 @@ export class DisplayAudio {
if (typeof cacheEntry === 'undefined' && create) {
cacheEntry = {
sourceMap: new Map(),
- primaryCardAudio: null
+ primaryCardAudio: null,
};
this._cache.set(key, cacheEntry);
}
@@ -389,7 +389,7 @@ export class DisplayAudio {
if (indexNumber >= 0 && indexNumber < this._audioSources.length) {
return {
source: this._audioSources[indexNumber],
- subIndex: typeof subIndex === 'string' ? Number.parseInt(subIndex, 10) : null
+ subIndex: typeof subIndex === 'string' ? Number.parseInt(subIndex, 10) : null,
};
}
}
@@ -617,7 +617,7 @@ export class DisplayAudio {
const result = {
audio: null,
index: -1,
- cacheUpdated: false
+ cacheUpdated: false,
};
for (let i = start; i < end; ++i) {
const item = infoList[i];