1
0
Эх сурвалжийг харах

disable save to clipboard in Safari

Gildas 3 жил өмнө
parent
commit
b6b6ee70be

+ 4 - 0
src/ui/bg/ui-options.js

@@ -32,6 +32,7 @@ const OPEN_SAVED_PAGE_SUPPORT = !/Safari/.test(navigator.userAgent) || /Chrome/.
 const INFOBAR_SUPPORT = !/Safari/.test(navigator.userAgent) || /Chrome/.test(navigator.userAgent);
 const BOOKMARKS_API_SUPPORTED = !/Safari/.test(navigator.userAgent) || /Chrome/.test(navigator.userAgent);
 const IDENTITY_API_SUPPORT = !/Safari/.test(navigator.userAgent) || /Chrome/.test(navigator.userAgent);
+const CLIPBOARD_API_SUPPORT = !/Safari/.test(navigator.userAgent) || /Chrome/.test(navigator.userAgent);
 
 browser.runtime.sendMessage({ method: "config.getConstants" }).then(data => ({ DEFAULT_PROFILE_NAME, DISABLED_PROFILE_NAME, CURRENT_PROFILE_NAME } = data));
 const removeHiddenElementsLabel = document.getElementById("removeHiddenElementsLabel");
@@ -683,6 +684,9 @@ if (!INFOBAR_SUPPORT) {
 if (!IDENTITY_API_SUPPORT) {
 	document.getElementById("saveToGDriveOption").hidden = true;
 }
+if (!CLIPBOARD_API_SUPPORT) {
+	document.getElementById("saveToClipboardOption").hidden = true;
+}
 
 getHelpContents();
 

+ 1 - 1
src/ui/pages/options.html

@@ -182,7 +182,7 @@
 				<label for="saveToFilesystemInput" id="saveToFilesystemLabel"></label>
 				<input type="radio" id="saveToFilesystemInput" name="destinationInput">
 			</div>
-			<div class="option">
+			<div class="option" id="saveToClipboardOption">
 				<label for="saveToClipboardInput" id="saveToClipboardLabel"></label>
 				<input type="radio" id="saveToClipboardInput" name="destinationInput">
 			</div>