Selaa lähdekoodia

activate "remove hidden elements" option by default

Gildas 7 vuotta sitten
vanhempi
sitoutus
fabdbe88d1
2 muutettua tiedostoa jossa 7 lisäystä ja 6 poistoa
  1. 4 1
      extension/core/bg/config.js
  2. 3 5
      extension/ui/pages/help.html

+ 4 - 1
extension/core/bg/config.js

@@ -23,7 +23,7 @@
 singlefile.config = (() => {
 
 	const DEFAULT_CONFIG = {
-		removeHiddenElements: false,
+		removeHiddenElements: true,
 		removeUnusedCSSRules: true,
 		removeFrames: true,
 		removeImports: true,
@@ -102,6 +102,9 @@ singlefile.config = (() => {
 		if (config.removeVideoSrc === undefined) {
 			config.removeVideoSrc = true;
 		}
+		if (config.removeHiddenElements === undefined) {
+			config.removeHiddenElements = true;
+		}
 	}
 
 	return {

+ 3 - 5
extension/ui/pages/help.html

@@ -101,12 +101,10 @@
 
 					<li>
 						<span class="option">remove hidden elements</span>
-						<p>Check this option to remove all hidden elements (
-							<code>visibility = "hidden"</code>,&nbsp;or&nbsp;
-							<code>display = "none"</code>,&nbsp;or&nbsp;
-							<code>opacity = "0"</code> CSS property values). This option may alter the document but can considerably reduce the size of the file.</p>
+						<p>Check this option to remove all hidden elements. This option can considerably reduce the size of the file without altering
+							the document most of the time.</p>
 						<p class="notice">It is recommended to
-							<u>uncheck</u> this option</p>
+							<u>check</u> this option</p>
 					</li>
 
 					<li>