diff --git a/www/js/app.js b/www/js/app.js index bbbceec5..b5e49ced 100644 --- a/www/js/app.js +++ b/www/js/app.js @@ -817,6 +817,7 @@ define(['jquery', 'zimArchiveLoader', 'util', 'uiUtil', 'cookies','abstractFiles function getBLOB(arr) { zimType = arr.join().match(/-\/s\/style\.css/i) ? "desktop" : zimType; zimType = arr.join().match(/minerva|mobile/i) ? "mobile" : zimType; + for (var i = 0; i < arr.length; i++) { var linkArray = regexpSheetHref.exec(arr[i]); regexpSheetHref.lastIndex = 0; //Reset start position for next loop diff --git a/www/js/lib/transformStyles.js b/www/js/lib/transformStyles.js index 6307398d..f17cf2f1 100644 --- a/www/js/lib/transformStyles.js +++ b/www/js/lib/transformStyles.js @@ -73,7 +73,7 @@ define([], function () { } function toMobileCSS(html, zim, cc, cs, css) { - //DEV: the css.match statements below won't match BLOB URLs! Careful not to add styles twice... //EDIT: NOW THEY DO!!!! + //DEV: Careful not to add styles twice... //NB Can't relocate to filterCSS function above because it filters styles serially and code would be called for every style... if (zim != cs) { //If ZIM doesn't match user-requested style, add in stylesheets if they're missing css += /-\/s\/css_modules\/content\.parsoid\.css/i.test(css) ? "" : '\r\n'; @@ -94,7 +94,7 @@ define([], function () { //Wrap