From e0edfeeb00e9fa2d56939ac3d5877042f6df6d60 Mon Sep 17 00:00:00 2001
From: Mossroy Downloading and storing large archives
Depending on your browser or framework, this app may be capable of running in two different modes, which we call - "JQuery Mode" and "ServiceWorker Mode" for short. There is a toggle under Compatibility Settings in Configuration. + "ServiceWorker Mode" and "JQuert Mode" for short. There is a toggle under Compatibility Settings in Configuration. Here is a technical explanation of what these modes do:
file:
protocol (but only IE11 and old Edge allow the app to run
by launching index.html
from the file system).
See About (Technical Information) for an explanation of the difference between these modes:
-Depending on your browser or framework, this app may be capable of running in two different modes, which we call - "ServiceWorker Mode" and "JQuert Mode" for short. There is a toggle under Compatibility Settings in Configuration. + "ServiceWorker Mode" and "JQuery Mode" for short. There is a toggle under Compatibility Settings in Configuration. Here is a technical explanation of what these modes do:
https:
, localhost
,
- or certain browser extensions). While this mode is not natively supported in Mozilla (Firefox) browser
- extensions, we provide a functional workaround by re-launching the extension as a Progressive Web App (PWA).
- Note that this mode cannot run with the file:
protocol (but only IE11 and old Edge allow the app to run
- by launching index.html
from the file system).
+ ServiceWorker Mode: This is the default mode. As its name implies, it requires that the browser or
+ framework be capable of installing a Service Worker, which is usually the case in modern browsers. It works
+ by intercepting the browser or framework's Fetch calls (network requests) and supplying the requested content
+ from the ZIM. This mode requires no DOM traversal, and the content is read and supplied as-is from the archive.
+ Dynamic content (e.g. JavaScript) and proprietary UIs are fully supported in this mode. It can feel initially a
+ little slower while commonly used assets are being cached, but it soon equals JQuery mode in speed, at least in
+ modern browsers. However, older browsers such as IE11 are incompatible with this mode, and the app must be running
+ in a secure context (https:
, localhost
, or certain browser extensions). While this mode
+ is not natively supported in Mozilla (Firefox) browser extensions, we provide a functional workaround by re-launching
+ the extension as a Progressive Web App (PWA). Note that this mode cannot run with the file:
protocol
+ (but only IE11 and old Edge allow the app to run by launching index.html
from the file system).
We have switched you to ServiceWorker mode (this is now the default). ' + + 'It supports more types of ZIM archives and is much more robust.
' + + 'If you experience problems with this mode, you can switch back to the (now deprecated) JQuery mode. ' + + 'In that case, please report the problems you experienced to us (see About section).
', + 'Change of default content injection mode' + ); + params.injectionModeChangeAlertDisplayed = true; + settingsStore.setItem('injectionModeChangeAlertDisplayed', true, Infinity); + } + } + /** * Displays or refreshes the API status shown to the user */ @@ -638,9 +655,10 @@ define(['jquery', 'zimArchiveLoader', 'uiUtil', 'settingsStore','abstractFilesys decompAPIStatusDiv.innerHTML = 'Decompressor API: ' + apiName; // Add a warning colour to the API Status Panel if any of the above tests failed apiStatusPanel.classList.add(apiPanelClass); - // Set visibility of UI elements according to mode document.getElementById('bypassAppCacheDiv').style.display = params.contentInjectionMode === 'serviceworker' ? 'block' : 'none'; + // Check to see whether we need to alert the user that we have switched to Service Worker mode by default + if (!params.injectionModeChangeAlertDisplayed) setTimeout(checkAndDisplayInjectionModeChangeAlert, 1500); } /** @@ -1518,11 +1536,6 @@ define(['jquery', 'zimArchiveLoader', 'uiUtil', 'settingsStore','abstractFilesys return; } - // Inform the user about content injection mode switch, if necessary - if (displayInjectionModeChangeAlert) { - uiUtil.displayInjectionModeChangeAlert(); - } - // We put the ZIM filename as a prefix in the URL, so that browser caches are separate for each ZIM file iframeArticleContent.src = "../" + selectedArchive._file.name + "/" + dirEntry.namespace + "/" + encodedUrl; } else { From 27fb93cd85cb2f816de97ba0a54b6c7eaba1694f Mon Sep 17 00:00:00 2001 From: JaifroidWe have switched you to ServiceWorker mode (this is now the default). ' + 'It supports more types of ZIM archives and is much more robust.
' + 'If you experience problems with this mode, you can switch back to the (now deprecated) JQuery mode. ' + 'In that case, please report the problems you experienced to us (see About section).
', 'Change of default content injection mode' ); - params.injectionModeChangeAlertDisplayed = true; - settingsStore.setItem('injectionModeChangeAlertDisplayed', true, Infinity); + params.defaultModeChangeAlertDisplayed = true; + settingsStore.setItem('defaultModeChangeAlertDisplayed', true, Infinity); } } @@ -658,7 +660,7 @@ define(['jquery', 'zimArchiveLoader', 'uiUtil', 'settingsStore','abstractFilesys // Set visibility of UI elements according to mode document.getElementById('bypassAppCacheDiv').style.display = params.contentInjectionMode === 'serviceworker' ? 'block' : 'none'; // Check to see whether we need to alert the user that we have switched to Service Worker mode by default - if (!params.injectionModeChangeAlertDisplayed) setTimeout(checkAndDisplayInjectionModeChangeAlert, 1500); + if (!params.defaultModeChangeAlertDisplayed) setTimeout(checkAndDisplayInjectionModeChangeAlert, 1500); } /** diff --git a/www/js/lib/uiUtil.js b/www/js/lib/uiUtil.js index e4a2a7999..e19382b3d 100644 --- a/www/js/lib/uiUtil.js +++ b/www/js/lib/uiUtil.js @@ -284,8 +284,8 @@ define(rqDef, function(settingsStore) { }); document.getElementById('acknowledgeServiceWorkerModeAsDefault').addEventListener('click', function () { alertInjectionMode.style.display = 'none'; - params.injectionModeChangeAlertDisplayed = true; - settingsStore.setItem('injectionModeChangeAlertDisplayed', true); + params.defaultModeChangeAlertDisplayed = true; + settingsStore.setItem('defaultModeChangeAlertDisplayed', true); }); } } From c0c92e046780096fb9acd9d682e0c86ab390adf8 Mon Sep 17 00:00:00 2001 From: JaifroidWe have switched you to ServiceWorker mode (this is now the default). ' + + uiUtil.systemAlert('
We have switched you to Service Worker mode (this is now the default). ' + 'It supports more types of ZIM archives and is much more robust.
' + 'If you experience problems with this mode, you can switch back to the (now deprecated) JQuery mode. ' + 'In that case, please report the problems you experienced to us (see About section).
', @@ -946,12 +946,17 @@ define(['jquery', 'zimArchiveLoader', 'uiUtil', 'settingsStore','abstractFilesys // DEV: See explanation below for why we access localStorage directly here var PWASuccessfullyLaunched = localStorage.getItem(params.keyPrefix + 'PWA_launch') === 'success'; var allowInternetAccess = settingsStore.getItem('allowInternetAccess') === 'true'; - var message = 'To enable the Service Worker, we need one-time access to our secure server ' + - 'so that the app can re-launch as a Progressive Web App (PWA).We are switching you to Service Worker mode (this is now the default). ' + + 'It supports more types of ZIM archives and is much more robust.
We ' : '
To enable the Service Worker, we '; + message += 'need one-time access to our secure server so that the app can re-launch as a Progressive Web App (PWA).
' + + 'The PWA will be able to run offline, but will auto-update periodically when online ' + + 'as per the Service Worker spec.
'; + message += (params.defaultModeChangeAlertDisplayed ? + 'If you experience problems with this mode, you can switch back to the (now deprecated) JQuery mode. ' + + 'In that case, please report the problems you experienced to us (see About section).
' : + 'You can switch back any time by returning to JQuery mode.
') + + 'WARNING: This will attempt to access the following server:
' + params.PWAServer + '
We are switching you to Service Worker mode (this is now the default). ' + 'It supports more types of ZIM archives and is much more robust.
We ' : '
To enable the Service Worker, we '; message += 'need one-time access to our secure server so that the app can re-launch as a Progressive Web App (PWA).
' + - 'The PWA will be able to run offline, but will auto-update periodically when online ' + - 'as per the Service Worker spec.
'; + 'The PWA will be able to run offline, but will auto-update periodically when online as per the Service Worker spec.
'; message += (params.defaultModeChangeAlertDisplayed ? 'If you experience problems with this mode, you can switch back to the (now deprecated) JQuery mode. ' + 'In that case, please report the problems you experienced to us (see About section).
' : @@ -1006,8 +1005,12 @@ define(['jquery', 'zimArchiveLoader', 'uiUtil', 'settingsStore','abstractFilesys if (response) { checkPWAIsOnline(); } else { + // User cancelled, so wants to stay in JQuery mode setContentInjectionMode('jquery'); settingsStore.setItem('allowInternetAccess', false, Infinity); + // We should not bother user with the default mode change alert again + params.defaultModeChangeAlertDisplayed = true; + settingsStore.setItem('defaultModeChangeAlertDisplayed', true, Infinity) } }); } From c24e3db383da69a0a7a09c00e530be6d2ced588b Mon Sep 17 00:00:00 2001 From: JaifroidWe are switching you to Service Worker mode (this is now the default). ' + - 'It supports more types of ZIM archives and is much more robust.
We ' : '
To enable the Service Worker, we '; + var message = params.defaultModeChangeAlertDisplayed ? '
To enable the Service Worker, we ' : + ('
We are switching you to Service Worker mode (this is now the default). ' + + 'It supports more types of ZIM archives and is much more robust.
We '); message += 'need one-time access to our secure server so that the app can re-launch as a Progressive Web App (PWA).
' + 'The PWA will be able to run offline, but will auto-update periodically when online as per the Service Worker spec.
'; - message += (params.defaultModeChangeAlertDisplayed ? - 'If you experience problems with this mode, you can switch back to the (now deprecated) JQuery mode. ' + - 'In that case, please report the problems you experienced to us (see About section).
' : - 'You can switch back any time by returning to JQuery mode.
') + + message += (params.defaultModeChangeAlertDisplayed ? 'You can switch back any time by returning to JQuery mode.
' : + ('If you experience problems with this mode, you can switch back to the (now deprecated) JQuery mode. ' + + 'In that case, please report the problems you experienced to us (see About section).
')) + 'WARNING: This will attempt to access the following server:
' + params.PWAServer + '
We have switched you to Service Worker mode (this is now the default). ' + + message = ['
We have switched you to Service Worker mode (this is now the default). ' + 'It supports more types of ZIM archives and is much more robust.
' + 'If you experience problems with this mode, you can switch back to the (now deprecated) JQuery mode. ' + 'In that case, please report the problems you experienced to us (see About section).
', - 'Change of default content injection mode' - ); + 'Change of default content injection mode']; + } else if (!params.defaultModeChangeAlertDisplayed && params.contentInjectionMode === 'jquery') { + message = ['Your browser or platform does not appear to support Service Worker mode, which is now the default for this app.
' + + 'You can continue to use the app in the (now deprecated) JQuery mode, but please note that this mode only works well with ' + + 'ZIM archives that have static content, such as Wikipedia / Wikimedia ZIMs or (for now) Stackexchange.
' + + 'If you are able, we strongly recommend that you update your browser to a version that supports Service Worker mode.
', + 'Service Worker mode unsupported']; + } + if (message) { + uiUtil.systemAlert(message[0], message[1]); params.defaultModeChangeAlertDisplayed = true; settingsStore.setItem('defaultModeChangeAlertDisplayed', true, Infinity); } From 65fa5467e39fd08e88fad6fdf2e52226f200319d Mon Sep 17 00:00:00 2001 From: JaifroidTo enable the Service Worker, we ' : - ('
We are switching you to Service Worker mode (this is now the default). ' + + ('
We shall attempt to switch you to Service Worker mode (this is now the default). ' + 'It supports more types of ZIM archives and is much more robust.
We '); message += 'need one-time access to our secure server so that the app can re-launch as a Progressive Web App (PWA).
' + 'The PWA will be able to run offline, but will auto-update periodically when online as per the Service Worker spec.
'; From 56791b302255b98fc91f633a0f65ff3dfc09cf0e Mon Sep 17 00:00:00 2001 From: JaifroidYour browser or platform does not appear to support Service Worker mode, which is now the default for this app.
' + + 'You can continue to use the app in the (now deprecated) JQuery mode, but please note that this mode only works well with ' + + 'ZIM archives that have static content, such as Wikipedia / Wikimedia ZIMs or (for now) Stackexchange.
' + + 'If you are able, we strongly recommend that you update your browser to a version that supports Service Worker mode.
'; + uiUtil.systemAlert(message, 'ServiceWorker API not available').then(function () { if (params.referrerExtensionURL) { var uriParams = '?allowInternetAccess=false&contentInjectionMode=jquery&defaultModeChangeAlertDisplayed=true'; window.location.href = params.referrerExtensionURL + '/www/index.html' + uriParams; From 548ab1e07b5adde16a7db1dc6152f39975c8a203 Mon Sep 17 00:00:00 2001 From: JaifroidYour browser or platform does not appear to support Service Worker mode, which is now the default for this app.
' + - 'You can continue to use the app in the (now deprecated) JQuery mode, but please note that this mode only works well with ' + - 'ZIM archives that have static content, such as Wikipedia / Wikimedia ZIMs or (for now) Stackexchange.
' + - 'If you are able, we strongly recommend that you update your browser to a version that supports Service Worker mode.
', + message = ['Your browser does not appear to support Service Worker mode, which is now the default for this app.
' + + 'You can continue to use the app in the (now deprecated) JQuery mode, but note that this mode only works well with ' + + 'ZIM archives that have static content, such as Wikipedia / Wikimedia ZIMs or Stackexchange.
' + + 'If you can, we recommend that you update your browser to a version that supports Service Worker mode.
', 'Service Worker mode unsupported']; } if (message) { @@ -832,10 +832,10 @@ define(['jquery', 'zimArchiveLoader', 'uiUtil', 'settingsStore','abstractFilesys } else { if (!isServiceWorkerAvailable()) { var message = - 'Your browser or platform does not appear to support Service Worker mode, which is now the default for this app.
' + - 'You can continue to use the app in the (now deprecated) JQuery mode, but please note that this mode only works well with ' + - 'ZIM archives that have static content, such as Wikipedia / Wikimedia ZIMs or (for now) Stackexchange.
' + - 'If you are able, we strongly recommend that you update your browser to a version that supports Service Worker mode.
'; + 'Your browser does not appear to support Service Worker mode, which is now the default for this app.
' + + 'You can continue to use the app in the (now deprecated) JQuery mode, but note that this mode only works well with ' + + 'ZIM archives that have static content, such as Wikipedia / Wikimedia ZIMs or Stackexchange.
' + + 'If you can, we recommend that you update your browser to a version that supports Service Worker mode.
'; uiUtil.systemAlert(message, 'ServiceWorker API not available').then(function () { if (params.referrerExtensionURL) { var uriParams = '?allowInternetAccess=false&contentInjectionMode=jquery&defaultModeChangeAlertDisplayed=true'; @@ -969,10 +969,8 @@ define(['jquery', 'zimArchiveLoader', 'uiUtil', 'settingsStore','abstractFilesys ('We shall attempt to switch you to Service Worker mode (this is now the default). ' + 'It supports more types of ZIM archives and is much more robust.
We '); message += 'need one-time access to our secure server so that the app can re-launch as a Progressive Web App (PWA).
' + - 'The PWA will be able to run offline, but will auto-update periodically when online as per the Service Worker spec.
'; - message += (params.defaultModeChangeAlertDisplayed ? 'You can switch back any time by returning to JQuery mode.
' : - ('If you experience problems with this mode, you can switch back to the (now deprecated) JQuery mode. ' + - 'In that case, please report the problems you experienced to us (see About section).
')) + + 'If available, the PWA will work offline, but will auto-update periodically when online as per the ' + + 'Service Worker spec.
You can switch back any time by returning to JQuery mode.
' + 'WARNING: This will attempt to access the following server:
' + params.PWAServer + '
To enable the Service Worker, we ' : ('
We shall attempt to switch you to Service Worker mode (this is now the default). ' + 'It supports more types of ZIM archives and is much more robust.
We '); - message += 'need one-time access to our secure server so that the app can re-launch as a Progressive Web App (PWA).
' + - 'If available, the PWA will work offline, but will auto-update periodically when online as per the ' + + message += 'need one-time access to our secure server so that the app can re-launch as a Progressive Web App (PWA). ' + + 'If available, the PWA will work offline, but will auto-update periodically when online as per the ' + 'Service Worker spec.
You can switch back any time by returning to JQuery mode.
' + 'WARNING: This will attempt to access the following server:
' + params.PWAServer + '
Your browser does not appear to support Service Worker mode, which is now the default for this app.
' + + message = ['Unfortunately, your browser does not appear to support Service Worker mode, which is now the default for this app.
' + 'You can continue to use the app in the (now deprecated) JQuery mode, but note that this mode only works well with ' + 'ZIM archives that have static content, such as Wikipedia / Wikimedia ZIMs or Stackexchange.
' + 'If you can, we recommend that you update your browser to a version that supports Service Worker mode.
', @@ -832,7 +832,7 @@ define(['jquery', 'zimArchiveLoader', 'uiUtil', 'settingsStore','abstractFilesys } else { if (!isServiceWorkerAvailable()) { var message = - 'Your browser does not appear to support Service Worker mode, which is now the default for this app.
' + + 'Unfortunately, your browser does not appear to support Service Worker mode, which is now the default for this app.
' + 'You can continue to use the app in the (now deprecated) JQuery mode, but note that this mode only works well with ' + 'ZIM archives that have static content, such as Wikipedia / Wikimedia ZIMs or Stackexchange.
' + 'If you can, we recommend that you update your browser to a version that supports Service Worker mode.
'; From 007a466288237443175c0235d977a5697018772c Mon Sep 17 00:00:00 2001 From: JaifroidYou can continue to use the app in the (now deprecated) JQuery mode, but note that this mode only works well with ' + 'ZIM archives that have static content, such as Wikipedia / Wikimedia ZIMs or Stackexchange.
' + 'If you can, we recommend that you update your browser to a version that supports Service Worker mode.
'; - uiUtil.systemAlert(message, 'ServiceWorker API not available').then(function () { - if (params.referrerExtensionURL) { + uiUtil.systemAlert(message, 'ServiceWorker API not available', true).then(function (response) { + if (params.referrerExtensionURL && response) { var uriParams = '?allowInternetAccess=false&contentInjectionMode=jquery&defaultModeChangeAlertDisplayed=true'; window.location.href = params.referrerExtensionURL + '/www/index.html' + uriParams; } else { From 6c02445ae8059f83c1620c453bd5e5be3755d439 Mon Sep 17 00:00:00 2001 From: JaifroidYou can continue to use the app in the (now deprecated) JQuery mode, but note that this mode only works well with ' + 'ZIM archives that have static content, such as Wikipedia / Wikimedia ZIMs or Stackexchange.
' + 'If you can, we recommend that you update your browser to a version that supports Service Worker mode.
'; - uiUtil.systemAlert(message, 'ServiceWorker API not available', true).then(function (response) { + uiUtil.systemAlert(message, 'ServiceWorker API not available', true, 'Cancel', 'Use JQuery mode').then(function (response) { if (params.referrerExtensionURL && response) { var uriParams = '?allowInternetAccess=false&contentInjectionMode=jquery&defaultModeChangeAlertDisplayed=true'; window.location.href = params.referrerExtensionURL + '/www/index.html' + uriParams; From 0f15c60a9669619d4e84e8ef0fc11bc54fca82af Mon Sep 17 00:00:00 2001 From: Jaifroidhttps:
, localhost
, or certain browser extensions). While this mode
- is not natively supported in Mozilla (Firefox) browser extensions, we provide a functional workaround by re-launching
+ in a secure context (https:
, localhost
, or certain browser extensions). While this mode is
+ not natively supported in Mozilla (Firefox) browser extensions, we provide a functional workaround by re-launching
the extension as a Progressive Web App (PWA). Note that this mode cannot run with the file:
protocol
(but only IE11 and old Edge allow the app to run by launching index.html
from the file system).
We have switched you to Service Worker mode (this is now the default). ' + + message = ['
We have switched you to ServiceWorker mode (this is now the default). ' + 'It supports more types of ZIM archives and is much more robust.
' + 'If you experience problems with this mode, you can switch back to the (now deprecated) JQuery mode. ' + 'In that case, please report the problems you experienced to us (see About section).
', 'Change of default content injection mode']; } else if (!params.defaultModeChangeAlertDisplayed && params.contentInjectionMode === 'jquery') { - message = ['Unfortunately, your browser does not appear to support Service Worker mode, which is now the default for this app.
' + + message = ['Unfortunately, your browser does not appear to support ServiceWorker mode, which is now the default for this app.
' + 'You can continue to use the app in the (now deprecated) JQuery mode, but note that this mode only works well with ' + 'ZIM archives that have static content, such as Wikipedia / Wikimedia ZIMs or Stackexchange.
' + - 'If you can, we recommend that you update your browser to a version that supports Service Worker mode.
', - 'Service Worker mode unsupported']; + 'If you can, we recommend that you update your browser to a version that supports ServiceWorker mode.
', + 'ServiceWorker mode unsupported']; } if (message) { uiUtil.systemAlert(message[0], message[1]); @@ -668,7 +668,7 @@ define(['jquery', 'zimArchiveLoader', 'uiUtil', 'settingsStore','abstractFilesys apiStatusPanel.classList.add(apiPanelClass); // Set visibility of UI elements according to mode document.getElementById('bypassAppCacheDiv').style.display = params.contentInjectionMode === 'serviceworker' ? 'block' : 'none'; - // Check to see whether we need to alert the user that we have switched to Service Worker mode by default + // Check to see whether we need to alert the user that we have switched to ServiceWorker mode by default if (!params.defaultModeChangeAlertDisplayed) setTimeout(checkAndDisplayInjectionModeChangeAlert, 1500); } @@ -832,10 +832,10 @@ define(['jquery', 'zimArchiveLoader', 'uiUtil', 'settingsStore','abstractFilesys } else { if (!isServiceWorkerAvailable()) { var message = - 'Unfortunately, your browser does not appear to support Service Worker mode, which is now the default for this app.
' + + 'Unfortunately, your browser does not appear to support ServiceWorker mode, which is now the default for this app.
' + 'You can continue to use the app in the (now deprecated) JQuery mode, but note that this mode only works well with ' + 'ZIM archives that have static content, such as Wikipedia / Wikimedia ZIMs or Stackexchange.
' + - 'If you can, we recommend that you update your browser to a version that supports Service Worker mode.
'; + 'If you can, we recommend that you update your browser to a version that supports ServiceWorker mode.
'; uiUtil.systemAlert(message, 'ServiceWorker API not available', true, 'Cancel', 'Use JQuery mode').then(function (response) { if (params.referrerExtensionURL && response) { var uriParams = '?allowInternetAccess=false&contentInjectionMode=jquery&defaultModeChangeAlertDisplayed=true'; @@ -855,7 +855,7 @@ define(['jquery', 'zimArchiveLoader', 'uiUtil', 'settingsStore','abstractFilesys if (!isServiceWorkerReady()) { $('#serviceWorkerStatus').html("ServiceWorker API available : trying to register it..."); if (navigator.serviceWorker.controller) { - console.log("Active service worker found, no need to register"); + console.log("Active Service Worker found, no need to register"); serviceWorkerRegistration = true; // Remove any jQuery hooks from a previous jQuery session $('#articleContent').contents().remove(); @@ -912,7 +912,7 @@ define(['jquery', 'zimArchiveLoader', 'uiUtil', 'settingsStore','abstractFilesys initOrKeepAliveServiceWorker(); } } - // User has switched to Service Worker mode, so no longer needs the memory cache + // User has switched to ServiceWorker mode, so no longer needs the memory cache // We should empty it to ensure good memory management resetCssCache(); } @@ -966,7 +966,7 @@ define(['jquery', 'zimArchiveLoader', 'uiUtil', 'settingsStore','abstractFilesys var PWASuccessfullyLaunched = localStorage.getItem(params.keyPrefix + 'PWA_launch') === 'success'; var allowInternetAccess = settingsStore.getItem('allowInternetAccess') === 'true'; var message = params.defaultModeChangeAlertDisplayed ? 'To enable the Service Worker, we ' : - ('
We shall attempt to switch you to Service Worker mode (this is now the default). ' + + ('
We shall attempt to switch you to ServiceWorker mode (this is now the default). ' + 'It supports more types of ZIM archives and is much more robust.
We ');
message += 'need one-time access to our secure server so that the app can re-launch as a Progressive Web App (PWA). ' +
'If available, the PWA will work offline, but will auto-update periodically when online as per the ' +
@@ -1946,7 +1946,7 @@ define(['jquery', 'zimArchiveLoader', 'uiUtil', 'settingsStore','abstractFilesys
/**
* Code below is currently non-functional in jQuery mode, but provides an outline of how JS scripts could
- * be attached to the DOM. Users who want JS support should switch to Service Worker mode if avaialable on
+ * be attached to the DOM. Users who want JS support should switch to ServiceWorker mode if avaialable on
* their browser/OS. There is an experimental implementation of JS support in jQuery mode in the branch
* Step 1: Download some content
everything except video and audio. Larger versions without any of these qualifiers contain everything, though pictures are always compressed.
- Currently only Mediawiki-based content (for instance Wikipedia and - Wikivoyage ), and StackExchange , have been thoroughly tested. Dynamic content (e.g. PhET) is only supported in ServiceWorker Mode - (see technical explanation below). + Dynamic content (e.g. PhET, or the proprietary User Interface in Gutenberg and TED Talks ZIMs) is supported in ServiceWorker Mode only (the default), + but not in JQuery mode (see technical explanation below). If you cannot run ServiceWorker mode, then you will most likely be limited to + static Mediawiki-based content (for instance Wikipedia + and Wikivoyage ), and + StackExchange .
For a quick test, you can start with the
@@ -664,7 +664,7 @@ If you experience problems with this mode, you can switch back to the (now deprecated) JQuery mode. ' +
'In that case, please report the problems you experienced to us (see About section). Unfortunately, your browser does not appear to support ServiceWorker mode, which is now the default for this app. You can continue to use the app in the (now deprecated) JQuery mode, but note that this mode only works well with ' +
'ZIM archives that have static content, such as Wikipedia / Wikimedia ZIMs or Stackexchange. If you can, we recommend that you update your browser to a version that supports ServiceWorker mode. If you experience problems with this mode, you can switch back to the (now deprecated) JQuery mode. ' +
'In that case, please report the problems you experienced to us (see About section). Unfortunately, your browser does not appear to support ServiceWorker mode, which is now the default for this app. You can continue to use the app in the (now deprecated) JQuery mode, but note that this mode only works well with ' +
'ZIM archives that have static content, such as Wikipedia / Wikimedia ZIMs or Stackexchange. If you can, we recommend that you update your browser to a version that supports ServiceWorker mode.Expert settings
Unable to display active content: This ZIM is not fully supported in jQuery mode.
Content may be available by searching above (type a letter of the alphabet), or else
- switch to Service Worker mode
+ switch to ServiceWorker mode
if your platform supports it. [Permanently hide]
From f558b1f38a497921dbcedf27cee6fa61b32d3a94 Mon Sep 17 00:00:00 2001
From: Jaifroid