From eb2222eb23feb43d355f5f6dbad97f9b85b939a6 Mon Sep 17 00:00:00 2001 From: Jaifroid Date: Mon, 5 Aug 2024 06:51:05 +0100 Subject: [PATCH] Fix transform to desktop --- www/js/app.js | 4 ++-- www/js/lib/transformStyles.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/www/js/app.js b/www/js/app.js index c4de6b31..6d32e8af 100644 --- a/www/js/app.js +++ b/www/js/app.js @@ -6329,8 +6329,8 @@ function displayArticleContentInContainer (dirEntry, htmlArticle) { '="-/s/style-mobile.css" rel="stylesheet" type="text/css">' : arr[i]; // Delete stylesheet if will be inserted via minerva anyway (avoid linking it twice) if (/inserted.style/i.test(arr[i]) && /minerva/i.test(testCSS) || - // We also remove the new pcs.css style as it is causing issues - /pcs\.css/i.test(arr[i])) { + // We also remove the new pcs.css style as it is causing issues + /pcs\.css/i.test(arr[i])) { arr.splice(i, 1); } } diff --git a/www/js/lib/transformStyles.js b/www/js/lib/transformStyles.js index a5f35b70..48df9387 100644 --- a/www/js/lib/transformStyles.js +++ b/www/js/lib/transformStyles.js @@ -55,7 +55,7 @@ var prefix = (window.location.protocol + '//' + window.location.host + window.lo function filterCSS (zl, zim, cc, cs, i) { var rtnFunction = 'injectCSS'; if ((zim !== cs) && zl.match(/(-\/(?:s\/css_modules\/|mw\/)?style\.css)|minerva|mobile|parsoid/i)) { // If it's the wrong ZIM type and style matches main styles... - if (zl.match(/-\/(?:s\/|mw\/)?style\.css|minerva|style-mobile\.css/i)) { // If it matches one of the required styles... + if (zl.match(/-\/(?:s\/|mw\/)?style\.css|minerva|style-mobile\.css|base\.css/i)) { // If it matches one of the required styles... zl = (cs === 'mobile') ? prefix + '-/s/style-mobile.css' : prefix + '-/s/style.css'; // Take it from cache, because not in the ZIM console.log('Matched #' + i + ' [' + zl + '] from local filesystem because style is not in ZIM' + '\nbut your display options require a ' + cs + ' style');