Bläddra i källkod

disable inputs when save raw page is enabled

Former-commit-id: 22ee9db12f8355e97a0d45e8fc8dc8a1257e8e1c
Gildas 6 år sedan
förälder
incheckning
1aba685d88
2 ändrade filer med 8 tillägg och 5 borttagningar
  1. 6 3
      extension/ui/bg/ui-options.js
  2. 2 2
      extension/ui/pages/help.html

+ 6 - 3
extension/ui/bg/ui-options.js

@@ -533,17 +533,20 @@
 		profileNamesInput.value = selectedProfileName;
 		renameProfileButton.disabled = deleteProfileButton.disabled = profileNamesInput.value == DEFAULT_PROFILE_NAME;
 		const profileOptions = profiles[selectedProfileName];
-		removeHiddenElementsInput.checked = profileOptions.removeHiddenElements;
+		removeHiddenElementsInput.checked = profileOptions.removeHiddenElements || profileOptions.saveRawPage;
+		removeHiddenElementsInput.disabled = profileOptions.saveRawPage;
 		removeUnusedStylesInput.checked = profileOptions.removeUnusedStyles;
 		removeUnusedFontsInput.checked = profileOptions.removeUnusedFonts;
-		removeFramesInput.checked = profileOptions.removeFrames;
+		removeFramesInput.checked = profileOptions.removeFrames || profileOptions.saveRawPage;
+		removeFramesInput.disabled = profileOptions.saveRawPage;
 		removeImportsInput.checked = profileOptions.removeImports;
 		removeScriptsInput.checked = profileOptions.removeScripts;
 		saveRawPageInput.checked = profileOptions.saveRawPage;
 		saveToClipboardInput.checked = profileOptions.saveToClipboard;
 		compressHTMLInput.checked = profileOptions.compressHTML;
 		compressCSSInput.checked = profileOptions.compressCSS;
-		loadDeferredImagesInput.checked = profileOptions.loadDeferredImages;
+		loadDeferredImagesInput.checked = profileOptions.loadDeferredImages && !profileOptions.saveRawPage;
+		loadDeferredImagesInput.disabled = profileOptions.saveRawPage;
 		loadDeferredImagesMaxIdleTimeInput.value = profileOptions.loadDeferredImagesMaxIdleTime;
 		loadDeferredImagesMaxIdleTimeInput.disabled = !profileOptions.loadDeferredImages || profileOptions.saveRawPage;
 		contextMenuEnabledInput.checked = profileOptions.contextMenuEnabled;

+ 2 - 2
extension/ui/pages/help.html

@@ -336,8 +336,8 @@
 					</li>
 					<li data-options-label="saveRawPageLabel"> <span class="option">Option: save raw page</span>
 						<p>Check this option to save the page without interpreting JavaScript. Checking this option may
-							alter the document, and will force the options "remove frames" to be enabled and "load
-							deferred images" to be disabled.</p>
+							alter the document, will force the options "remove frames", "remove hidden elements" to
+							be enabled and "load deferred images" to be disabled.</p>
 						<p class="notice">It is recommended to <u>uncheck</u> this option</p>
 					</li>
 					<li data-options-label="saveToClipboardLabel"> <span class="option">Option: save to clipboard</span>