diff --git a/www/index.html b/www/index.html index b0ac3ca9..78b3378a 100644 --- a/www/index.html +++ b/www/index.html @@ -74,7 +74,7 @@ }).then(function (reg) { console.log("Service Worker has been registered for scope: " + reg.scope); }).catch(function (err) { - console.err('Service Worker could not be registered', err); + console.error('Service Worker could not be registered', err); }); } } else { diff --git a/www/js/init.js b/www/js/init.js index ed48e057..06b3761c 100644 --- a/www/js/init.js +++ b/www/js/init.js @@ -95,8 +95,8 @@ params['hideActiveContentWarning'] = getSetting('hideActiveContentWarning') != n params['allowHTMLExtraction'] = getSetting('allowHTMLExtraction') == true; params['alphaChar'] = getSetting('alphaChar') || 'A'; //Set default start of alphabet string (used by the Archive Index) params['omegaChar'] = getSetting('omegaChar') || 'Z'; //Set default end of alphabet string -params['contentInjectionMode'] = getSetting('contentInjectionMode') || (navigator.serviceWorker && !/^(ms-appx-web:)$/i.test(window.location.protocol) - && !/Android/.test(params.appType) ? 'serviceworker' : 'jquery'); // Deafault to SW mode if the browser supports it +params['contentInjectionMode'] = getSetting('contentInjectionMode') || ((navigator.serviceWorker && !/^(ms-appx-web:)$/i.test(window.location.protocol) + && !/Android/.test(params.appType)) ? 'serviceworker' : 'jquery'); // Deafault to SW mode if the browser supports it params['allowInternetAccess'] = getSetting('allowInternetAccess'); params['windowOpener'] = getSetting('windowOpener'); // 'tab|window|false' A setting that determines whether right-click/long-press of a ZIM link opens a new window/tab params['rightClickType'] = getSetting('rightClickType'); // 'single|double|false' A setting that determines whether a single or double right-click is used to open a new window/tab