Fix transform to desktop

This commit is contained in:
Jaifroid 2024-08-05 06:51:05 +01:00
parent 2928134393
commit eb2222eb23
2 changed files with 3 additions and 3 deletions

View File

@ -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);
}
}

View File

@ -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');