summaryrefslogtreecommitdiff
path: root/ext/js/background/offscreen-proxy.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/background/offscreen-proxy.js
parentb3f54747eb2694bdc90bce72e5532e99d374ef08 (diff)
Allow trailing commas in ESLint (#1013)
* Update comma-dangle rule * Fix dangling commas
Diffstat (limited to 'ext/js/background/offscreen-proxy.js')
-rw-r--r--ext/js/background/offscreen-proxy.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/ext/js/background/offscreen-proxy.js b/ext/js/background/offscreen-proxy.js
index 9e7b5b74..7150cc29 100644
--- a/ext/js/background/offscreen-proxy.js
+++ b/ext/js/background/offscreen-proxy.js
@@ -72,9 +72,9 @@ export class OffscreenProxy {
this._creatingOffscreen = chrome.offscreen.createDocument({
url: 'offscreen.html',
reasons: [
- /** @type {chrome.offscreen.Reason} */ ('CLIPBOARD')
+ /** @type {chrome.offscreen.Reason} */ ('CLIPBOARD'),
],
- justification: 'Access to the clipboard'
+ justification: 'Access to the clipboard',
});
await this._creatingOffscreen;
this._creatingOffscreen = null;
@@ -96,9 +96,9 @@ export class OffscreenProxy {
const contexts = await chrome.runtime.getContexts({
contextTypes: [
- /** @type {chrome.runtime.ContextType} */ ('OFFSCREEN_DOCUMENT')
+ /** @type {chrome.runtime.ContextType} */ ('OFFSCREEN_DOCUMENT'),
],
- documentUrls: [offscreenUrl]
+ documentUrls: [offscreenUrl],
});
return contexts.length > 0;
}
@@ -199,7 +199,7 @@ export class TranslatorProxy {
/** @type {import('offscreen').FindKanjiOptionsOffscreen} */
const modifiedOptions = {
...options,
- enabledDictionaryMap: enabledDictionaryMapList
+ enabledDictionaryMap: enabledDictionaryMapList,
};
return this._offscreen.sendMessagePromise({action: 'findKanjiOffscreen', params: {text, options: modifiedOptions}});
}
@@ -222,7 +222,7 @@ export class TranslatorProxy {
...options,
enabledDictionaryMap: enabledDictionaryMapList,
excludeDictionaryDefinitions: excludeDictionaryDefinitionsList,
- textReplacements: textReplacementsSerialized
+ textReplacements: textReplacementsSerialized,
};
return this._offscreen.sendMessagePromise({action: 'findTermsOffscreen', params: {mode, text, options: modifiedOptions}});
}