Fix display of masonry tiles on latest ZIMs

Former-commit-id: a8749ac790985ceb7fe44f35fb1f43caaccefbc6 [formerly 4ffbf545f3eaa5f27aaffca48648da1f72db3685 [formerly 5c95c0be501bedfdc970f17d9aede8789e33cdf9]]
Former-commit-id: af3128fd2d708acc263cd13b127f994d784dac8a
Former-commit-id: fee15e38d9e05f3a8280e12d47e90396a7b84b3d
This commit is contained in:
Jaifroid 2021-02-09 21:02:17 +00:00
parent 2f18af71d1
commit a38faa0761

View File

@ -3210,7 +3210,7 @@ define(['jquery', 'zimArchiveLoader', 'uiUtil', 'util', 'cache', 'images', 'sett
// Remove the script.js that closes top-level sections if user requested this
if (params.openAllSections) htmlArticle = htmlArticle.replace(/<script\b[^>]+-\/(j\/js_modules\/)?script\.js"[^<]*<\/script>/i, "");
// Remove landing page scripts that don't work in SW mode
if (params.cssCache) htmlArticle = htmlArticle.replace(/<script\b[^>]+-\/j\/js_modules\/((?:images_loaded|masonry)\.min|article_list_home)\.js"[^<]*<\/script>/gi, "");
if (params.cssCache) htmlArticle = htmlArticle.replace(/<script\b[^>]+-\/[^>]*((?:images_loaded|masonry)\.min|article_list_home)\.js"[^<]*<\/script>/gi, "");
//Remove empty div that causes layout issues in desktop style
htmlArticle = htmlArticle.replace(/<div\b[^>]*?>\s*<\/div>\s*/, '');