From 3c26a208ae4de67dbd26a72294e10dc546100cb2 Mon Sep 17 00:00:00 2001 From: Jaifroid Date: Thu, 8 Aug 2024 22:24:51 +0100 Subject: [PATCH] Remove wm_mobile_override_script.js for new Wikipedia endpoint ZIMs See #633 --- www/js/app.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/www/js/app.js b/www/js/app.js index 6d32e8af..fa0a21b5 100644 --- a/www/js/app.js +++ b/www/js/app.js @@ -6062,6 +6062,8 @@ function displayArticleContentInContainer (dirEntry, htmlArticle) { // if (/^mdwiki/.test(appstate.selectedArchive.file.name)) htmlArticle = htmlArticle.replace(/(class=['"]thumbinner[^>]+style=['"]width\s*:\s*)\d+px/ig, '$1320px'); // Remove landing page scripts that don't work in SW mode htmlArticle = htmlArticle.replace(/]+-\/[^>]*((?:images_loaded|masonry)\.min|article_list_home)\.js"[^<]*<\/script>/gi, ''); + // Remove wm_mobile_override script that intercepts all clicks and causes CORS errors + htmlArticle = htmlArticle.replace(/]+wm_mobile_override_script\.js[^<]*<\/script>/i, ''); // Set max-width for infoboxes (now set in -/s/styles.css) // htmlArticle = htmlArticle.replace(/(