Sfoglia il codice sorgente

disable feature in Safari

Gildas 3 anni fa
parent
commit
3502556c5c
2 ha cambiato i file con 5 aggiunte e 1 eliminazioni
  1. 4 0
      src/ui/bg/ui-options.js
  2. 1 1
      src/ui/pages/options.html

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

@@ -34,6 +34,7 @@ const BOOKMARKS_API_SUPPORTED = !/Safari/.test(navigator.userAgent) || /Chrome/.
 const IDENTITY_API_SUPPORT = !/Safari/.test(navigator.userAgent) || /Chrome/.test(navigator.userAgent);
 const CLIPBOARD_API_SUPPORT = !/Safari/.test(navigator.userAgent) || /Chrome/.test(navigator.userAgent);
 const NATIVE_API_API_SUPPORT = !/Safari/.test(navigator.userAgent) || /Chrome/.test(navigator.userAgent);
+const WEB_BLOCKING_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");
@@ -691,6 +692,9 @@ if (!CLIPBOARD_API_SUPPORT) {
 if (!NATIVE_API_API_SUPPORT) {
 	document.getElementById("saveWithCompanionOption").hidden = true;
 }
+if (!WEB_BLOCKING_API_SUPPORT) {
+	document.getElementById("passReferrerOnErrorOption").hidden = true;
+}
 
 getHelpContents();
 

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

@@ -311,7 +311,7 @@
 				<label for="maxResourceDelayInput" id="maxResourceDelayLabel"></label>
 				<input type="number" id="maxResourceDelayInput" min="1">
 			</div>
-			<div class="option">
+			<div class="option" id="passReferrerOnErrorOption">
 				<label for="passReferrerOnErrorInput" id="passReferrerOnErrorLabel"></label>
 				<input type="checkbox" id="passReferrerOnErrorInput">
 			</div>