Mark ActionParse as Desktop style

Fixes #721
This commit is contained in:
Jaifroid 2025-06-10 05:44:36 +01:00
parent 9ff7448bbb
commit 54e5a429ef

View File

@ -6498,10 +6498,10 @@ function displayArticleContentInContainer (dirEntry, htmlArticle) {
// Extract CSS URLs from given array of links
function getBLOB (arr) {
var testCSS = arr.join();
zimType = /-\/s\/style\.css/i.test(testCSS) ? 'desktop' : zimType;
zimType = /-\/s\/style\.css|vector/i.test(testCSS) ? 'desktop' : zimType;
zimType = /-\/static\/main\.css|statc\/css\/sotoki.css/i.test(testCSS) ? 'desktop-stx' : zimType; // Support stackexchange
zimType = /gutenberg\.css/i.test(testCSS) ? 'desktop-gtb' : zimType; // Support Gutenberg
zimType = /minerva|mobile|vector/i.test(testCSS) ? 'mobile' : zimType;
zimType = /minerva|mobile/i.test(testCSS) ? 'mobile' : zimType;
cssSource = cssSource == 'auto' ? zimType : cssSource; // Default to in-built zimType if user has selected automatic detection of styles
if (/minerva|inserted.style|pcs\.css/i.test(testCSS) && (cssCache || zimType != cssSource)) {
// Substitute ridiculously long style name TODO: move this code to transformStyles