mirror of
https://github.com/kiwix/kiwix-js-pwa.git
synced 2025-09-09 12:19:46 -04:00
Fix broken manual display of images in SW mode
Former-commit-id: 88e77863276d27858df5a68262d097204717684e [formerly 05a574b485f693fad70061ae986d989607c51b1e [formerly 1ef618326dbb7021b0c8edd7213a9fdf2634b6dc]] Former-commit-id: d32a0f454c143b4c5ff219e40d90245f93eed130 Former-commit-id: 168ea335e3b71028560af6036d61319d3eca42ff
This commit is contained in:
parent
bcb44904a9
commit
20f11fef15
@ -222,7 +222,7 @@ define(['uiUtil'], function (uiUtil) {
|
||||
});
|
||||
}
|
||||
// DEV: make sure list of file types here is the same as the list in Service Worker code
|
||||
if (/(^|\/)[IJ]\/.*\.(jpe?g|png|svg|gif)($|[?#])/i.test(documentImages[i].src)) {
|
||||
if (/(^|\/)[IJ]\/.*\.(jpe?g|png|svg|gif|webp)($|[?#])/i.test(documentImages[i].src)) {
|
||||
documentImages[i].dataset.kiwixurl = documentImages[i].getAttribute('src');
|
||||
if (params.imageDisplayMode === 'progressive') {
|
||||
documentImages[i].style.opacity = '0';
|
||||
|
@ -86,6 +86,7 @@ define(['util', 'uiUtil'], function (util, uiUtil) {
|
||||
}
|
||||
// Rename this required mobile style so that we don't trigger reading ZIM as mobile in print intercept
|
||||
zl = /\/mobile_main_page\.css/.test(zl) ? "-/s/css_modules/newstyle_main_page.css" : zl;
|
||||
zl = /\/content\.parsoid\.css/.test(zl) ? "-/s/css_modules/content.parsoid.css" : zl;
|
||||
// Replace bootstrap with own: DEV: when upgrading to Bootstrap 4, stop doing this!
|
||||
zl = zl.replace(/.+(bootstrap[^\/]*?\.css)/i, "css/$1");
|
||||
console.log("Matched #" + i + " [" + zl + "] from local filesystem");
|
||||
|
Loading…
x
Reference in New Issue
Block a user