فهرست منبع

disable "remove unused styles" option by default on android

Gildas 7 سال پیش
والد
کامیت
3f1804eb94
1فایلهای تغییر یافته به همراه7 افزوده شده و 2 حذف شده
  1. 7 2
      extension/core/bg/config.js

+ 7 - 2
extension/core/bg/config.js

@@ -99,7 +99,12 @@ singlefile.config = (() => {
 			config.maxResourceSize = 1;
 		}
 		if (config.removeUnusedCSSRules === undefined || config.removeUnusedCSSRules) {
-			config.removeUnusedStyles = true;
+			const platformInfo = await browser.runtime.getPlatformInfo();
+			if (platformInfo.os == "android") {
+				config.removeUnusedStyles = false;
+			} else {
+				config.removeUnusedStyles = true;
+			}
 		}
 		if (config.removeFrames === undefined) {
 			config.removeFrames = true;
@@ -121,7 +126,7 @@ singlefile.config = (() => {
 		}
 		if (config.removeAlternativeFonts === undefined) {
 			config.removeAlternativeFonts = true;
-		}		
+		}
 		if (config.autoSaveLoadOrUnload === undefined && !config.autoSaveUnload) {
 			config.autoSaveLoadOrUnload = true;
 			config.autoSaveLoad = false;