aboutsummaryrefslogtreecommitdiff
path: root/ext/js/pages
diff options
context:
space:
mode:
Diffstat (limited to 'ext/js/pages')
-rw-r--r--ext/js/pages/action-popup-main.js3
-rw-r--r--ext/js/pages/settings/backup-controller.js12
-rw-r--r--ext/js/pages/settings/profile-controller.js3
-rw-r--r--ext/js/pages/welcome-main.js2
4 files changed, 13 insertions, 7 deletions
diff --git a/ext/js/pages/action-popup-main.js b/ext/js/pages/action-popup-main.js
index e5738878..b5728215 100644
--- a/ext/js/pages/action-popup-main.js
+++ b/ext/js/pages/action-popup-main.js
@@ -50,7 +50,8 @@ class DisplayController {
typeof manifest.options_ui === 'object' &&
manifest.options_ui !== null &&
typeof manifest.options_ui.page === 'string' ?
- manifest.options_ui.page : ''
+ manifest.options_ui.page :
+ ''
);
this._setupButtonEvents('.action-open-settings', 'openSettingsPage', chrome.runtime.getURL(optionsPageUrl));
this._setupButtonEvents('.action-open-permissions', null, chrome.runtime.getURL('/permissions.html'));
diff --git a/ext/js/pages/settings/backup-controller.js b/ext/js/pages/settings/backup-controller.js
index 79733c4d..59bcaed9 100644
--- a/ext/js/pages/settings/backup-controller.js
+++ b/ext/js/pages/settings/backup-controller.js
@@ -579,7 +579,9 @@ export class BackupController {
*/
async _exportDatabase(databaseName) {
const db = await new Dexie(databaseName).open();
- const blob = await db.export({progressCallback: this._databaseExportProgressCallback});
+ const blob = await db.export({
+ progressCallback: this._databaseExportProgressCallback.bind(this)
+ });
await db.close();
return blob;
}
@@ -639,12 +641,14 @@ export class BackupController {
}
/**
- * @param {string} databaseName
+ * @param {string} _databaseName
* @param {File} file
*/
- async _importDatabase(databaseName, file) {
+ async _importDatabase(_databaseName, file) {
await this._settingsController.application.api.purgeDatabase();
- await Dexie.import(file, {progressCallback: this._databaseImportProgressCallback});
+ await Dexie.import(file, {
+ progressCallback: this._databaseImportProgressCallback.bind(this)
+ });
this._settingsController.application.api.triggerDatabaseUpdated('dictionary', 'import');
this._settingsController.application.triggerStorageChanged();
}
diff --git a/ext/js/pages/settings/profile-controller.js b/ext/js/pages/settings/profile-controller.js
index c5ccbe7d..5a7b5ed4 100644
--- a/ext/js/pages/settings/profile-controller.js
+++ b/ext/js/pages/settings/profile-controller.js
@@ -549,7 +549,8 @@ export class ProfileController {
Number.isFinite(intValue) &&
intValue >= 0 &&
intValue < this.profileCount ?
- intValue : null
+ intValue :
+ null
);
}
diff --git a/ext/js/pages/welcome-main.js b/ext/js/pages/welcome-main.js
index 82afaacb..9990b4e7 100644
--- a/ext/js/pages/welcome-main.js
+++ b/ext/js/pages/welcome-main.js
@@ -63,7 +63,7 @@ await Application.main(async (application) => {
setupEnvironmentInfo(application.api);
- chrome.storage.session.get({'needsCustomTemplatesWarning': false}).then((result) => {
+ chrome.storage.session.get({needsCustomTemplatesWarning: false}).then((result) => {
if (result.needsCustomTemplatesWarning) {
document.documentElement.dataset.warnCustomTemplates = 'true';
chrome.storage.session.remove(['needsCustomTemplatesWarning']);