diff --git a/service-worker.js b/service-worker.js index fe39ad3ec..1cba029ea 100644 --- a/service-worker.js +++ b/service-worker.js @@ -718,7 +718,7 @@ function fetchUrlFromZIM (urlObjectOrString, range, expectedHeaders) { var slicedData = msgPortEvent.data.content; - if (range && zimType === 'zimit') { + if (range && /zimit/.test(zimType)) { headers.set('Content-Range', range + '/*'); } else if (range && slicedData !== null) { // The browser asks for a range of bytes (usually for a video or audio stream) diff --git a/www/js/app.js b/www/js/app.js index e27f4ee51..b7753b1e5 100644 --- a/www/js/app.js +++ b/www/js/app.js @@ -5988,7 +5988,7 @@ function displayArticleContentInContainer (dirEntry, htmlArticle) { assetZIMUrlEnc = relAssetUrl.replace(indexRoot, ''); assetZIMUrlEnc = assetZIMUrlEnc + querystring; } - if (params.zimType !== 'zimit') { + if (params.zimType !== 'zimit') { // Includes zimit2 // DEV: Note that deriveZimUrlFromRelativeUrl produces a *decoded* URL (and incidentally would remove any URI component // if we had captured it). We therefore re-encode the URI with encodeURI (which does not encode forward slashes) instead // of encodeURIComponent.