Преглед на файлове

disable save to GDrive in Safari

Gildas преди 3 години
родител
ревизия
065fb36203
променени са 2 файла, в които са добавени 6 реда и са изтрити 2 реда
  1. 5 1
      src/ui/bg/ui-options.js
  2. 1 1
      src/ui/pages/options.html

+ 5 - 1
src/ui/bg/ui-options.js

@@ -31,6 +31,7 @@ const BACKGROUND_SAVE_SUPPORTED = !(/Mobile.*Firefox/.test(navigator.userAgent)
 const OPEN_SAVED_PAGE_SUPPORT = !/Safari/.test(navigator.userAgent) || /Chrome/.test(navigator.userAgent);
 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);
 
 browser.runtime.sendMessage({ method: "config.getConstants" }).then(data => ({ DEFAULT_PROFILE_NAME, DISABLED_PROFILE_NAME, CURRENT_PROFILE_NAME } = data));
 const removeHiddenElementsLabel = document.getElementById("removeHiddenElementsLabel");
@@ -677,7 +678,10 @@ if (!OPEN_SAVED_PAGE_SUPPORT) {
 	document.getElementById("autoOpenEditorOption").hidden = true;
 }
 if (!INFOBAR_SUPPORT) {
-	document.getElementById("displayInfobar").hidden = true;
+	document.getElementById("displayInfobarOption").hidden = true;
+}
+if (!IDENTITY_API_SUPPORT) {
+	document.getElementById("saveToGDriveOption").hidden = true;
 }
 
 getHelpContents();

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

@@ -222,7 +222,7 @@
 				<label for="webDAVPasswordInput" id="webDAVPasswordLabel"></label>
 				<input type="password" id="webDAVPasswordInput" class="medium-input">
 			</div>
-			<div class="option">
+			<div class="option" id="saveToGDriveOption">
 				<label for="saveToGDriveInput" id="saveToGDriveLabel"></label>
 				<input type="radio" id="saveToGDriveInput" name="destinationInput">
 			</div>