From 2d8f4a6f24fca5807350b5ba0890e3d23ccbd7b6 Mon Sep 17 00:00:00 2001 From: Jaifroid Date: Sat, 16 Mar 2024 12:14:38 +0000 Subject: [PATCH] Fix ESLint issues --- www/js/app.js | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/www/js/app.js b/www/js/app.js index 7d55932df..0d207b3bc 100644 --- a/www/js/app.js +++ b/www/js/app.js @@ -637,7 +637,10 @@ function focusPrefixOnHomeKey (event) { * @param {archive} the archive that needs verification * */ async function verifyLoadedArchive (archive) { - const response = await uiUtil.systemAlert(translateUI.t('dialog-sourceverification-alert') || 'Is this ZIM archive from a trusted source?\n If not, you can still read the ZIM file in Safe Mode. Closing this window also opens the file in Safe Mode. This option can be disabled in Expert Settings', translateUI.t('dialog-sourceverification-title') || 'Security alert!', true, translateUI.t('dialog-sourceverification-safe-mode-button') || 'Open in Safe Mode', translateUI.t('dialog-sourceverification-trust-button')|| 'Trust Source'); + const response = await uiUtil.systemAlert(translateUI.t('dialog-sourceverification-alert') || + 'Is this ZIM archive from a trusted source?\n If not, you can still read the ZIM file in Safe Mode. Closing this window also opens the file in Safe Mode. This option can be disabled in Expert Settings', + translateUI.t('dialog-sourceverification-title') || 'Security alert!', true, translateUI.t('dialog-sourceverification-safe-mode-button') || 'Open in Safe Mode', + translateUI.t('dialog-sourceverification-trust-button') || 'Trust Source'); if (response) { params.contentInjectionMode = 'serviceworker'; var trustedZimFiles = settingsStore.getItem('trustedZimFiles'); @@ -1720,12 +1723,12 @@ async function archiveReadyCallback (archive) { params.contentInjectionMode = settingsStore.getItem('contentInjectionMode'); // Change the radio buttons accordingly switch (settingsStore.getItem('contentInjectionMode')) { - case 'serviceworker': - document.getElementById('serviceworkerModeRadio').checked = true; - break; - case 'serviceworkerlocal': - document.getElementById('serviceworkerLocalModeRadio').checked = true; - break; + case 'serviceworker': + document.getElementById('serviceworkerModeRadio').checked = true; + break; + case 'serviceworkerlocal': + document.getElementById('serviceworkerLocalModeRadio').checked = true; + break; } } if (settingsStore.getItem('trustedZimFiles') === null) {