summaryrefslogtreecommitdiff
path: root/ext/js/data
diff options
context:
space:
mode:
Diffstat (limited to 'ext/js/data')
-rw-r--r--ext/js/data/anki-note-builder.js24
-rw-r--r--ext/js/data/database.js2
-rw-r--r--ext/js/data/options-util.js6
3 files changed, 18 insertions, 14 deletions
diff --git a/ext/js/data/anki-note-builder.js b/ext/js/data/anki-note-builder.js
index 4920db39..864bd2d4 100644
--- a/ext/js/data/anki-note-builder.js
+++ b/ext/js/data/anki-note-builder.js
@@ -51,15 +51,15 @@ export class AnkiNoteBuilder {
deckName,
modelName,
fields,
- tags=[],
- requirements=[],
- checkForDuplicates=true,
- duplicateScope='collection',
- duplicateScopeCheckAllModels=false,
- resultOutputMode='split',
- glossaryLayoutMode='default',
- compactTags=false,
- mediaOptions=null
+ tags = [],
+ requirements = [],
+ checkForDuplicates = true,
+ duplicateScope = 'collection',
+ duplicateScopeCheckAllModels = false,
+ resultOutputMode = 'split',
+ glossaryLayoutMode = 'default',
+ compactTags = false,
+ mediaOptions = null
}) {
let duplicateScopeDeckName = null;
let duplicateScopeCheckChildren = false;
@@ -130,9 +130,9 @@ export class AnkiNoteBuilder {
dictionaryEntry,
mode,
context,
- resultOutputMode='split',
- glossaryLayoutMode='default',
- compactTags=false,
+ resultOutputMode = 'split',
+ glossaryLayoutMode = 'default',
+ compactTags = false,
marker
}) {
const commonData = this._createData(dictionaryEntry, mode, context, resultOutputMode, glossaryLayoutMode, compactTags, void 0);
diff --git a/ext/js/data/database.js b/ext/js/data/database.js
index 026945ca..8b9e7354 100644
--- a/ext/js/data/database.js
+++ b/ext/js/data/database.js
@@ -265,7 +265,7 @@ export class Database {
* @param {?(completedCount: number, totalCount: number) => void} onProgress
* @returns {Promise<void>}
*/
- bulkDelete(objectStoreName, indexName, query, filterKeys=null, onProgress=null) {
+ bulkDelete(objectStoreName, indexName, query, filterKeys = null, onProgress = null) {
return new Promise((resolve, reject) => {
const transaction = this._readWriteTransaction([objectStoreName], resolve, reject);
const objectStore = transaction.objectStore(objectStoreName);
diff --git a/ext/js/data/options-util.js b/ext/js/data/options-util.js
index 70c1622f..c3c0e685 100644
--- a/ext/js/data/options-util.js
+++ b/ext/js/data/options-util.js
@@ -39,7 +39,7 @@ export class OptionsUtil {
* @param {?number} [targetVersion]
* @returns {Promise<import('settings').Options>}
*/
- async update(optionsInput, targetVersion=null) {
+ async update(optionsInput, targetVersion = null) {
// Invalid options
let options = /** @type {{[key: string]: unknown}} */ (
typeof optionsInput === 'object' && optionsInput !== null && !Array.isArray(optionsInput) ?
@@ -530,6 +530,7 @@ export class OptionsUtil {
* @returns {import('options-util').ModernUpdate[]}
*/
_getVersionUpdates(targetVersion) {
+ /* eslint-disable no-multi-spaces */
const result = [
{async: false, update: this._updateVersion1.bind(this)},
{async: false, update: this._updateVersion2.bind(this)},
@@ -553,6 +554,7 @@ export class OptionsUtil {
{async: false, update: this._updateVersion20.bind(this)},
{async: true, update: this._updateVersion21.bind(this)}
];
+ /* eslint-enable no-multi-spaces */
if (typeof targetVersion === 'number' && targetVersion < result.length) {
result.splice(targetVersion);
}
@@ -818,6 +820,7 @@ export class OptionsUtil {
};
delete profile.options.anki.sentenceExt;
profile.options.general.popupActionBarLocation = 'top';
+ /* eslint-disable no-multi-spaces */
profile.options.inputs = {
hotkeys: [
{action: 'close', key: 'Escape', modifiers: [], scopes: ['popup'], enabled: true},
@@ -838,6 +841,7 @@ export class OptionsUtil {
{action: 'copyHostSelection', key: 'KeyC', modifiers: ['ctrl'], scopes: ['popup'], enabled: true}
]
};
+ /* eslint-enable no-multi-spaces */
profile.options.anki.suspendNewCards = false;
profile.options.popupWindow = {
width: profile.options.general.popupWidth,