about summary refs log tree commit diff stats
path: root/src/pages/options
diff options
context:
space:
mode:
Diffstat (limited to 'src/pages/options')
-rw-r--r--src/pages/options/widgets/general.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/pages/options/widgets/general.js b/src/pages/options/widgets/general.js
index 5407159d..56439a95 100644
--- a/src/pages/options/widgets/general.js
+++ b/src/pages/options/widgets/general.js
@@ -156,6 +156,15 @@ protocolFallbackCheckbox.addEventListener("change", event => {
 	browser.storage.local.set({ protocolFallback: event.target.checked })
 })
 
+let latencyOutput = document.getElementById("latency-output")
+let latencyInput = document.getElementById("latency-input")
+latencyInput.addEventListener("change", event => {
+	browser.storage.local.set({ latencyThreshold: event.target.value})
+})
+latencyInput.addEventListener("input", event => {
+	latencyOutput.value = event.target.value
+})
+
 let nameCustomInstanceInput = document.getElementById("exceptions-custom-instance")
 let instanceTypeElement = document.getElementById("exceptions-custom-instance-type")
 let instanceType = "url"
@@ -181,6 +190,7 @@ browser.storage.local.get(
 		"exceptions",
 		"protocol",
 		"protocolFallback",
+		"latencyThreshold",
 		// 'firstPartyIsolate'
 	],
 	r => {
@@ -188,6 +198,7 @@ browser.storage.local.get(
 		themeElement.value = r.theme
 		protocolElement.value = r.protocol
 		protocolFallbackCheckbox.checked = r.protocolFallback
+		latencyOutput.value = r.latencyThreshold
 		// firstPartyIsolate.checked = r.firstPartyIsolate;
 
 		let protocolFallbackElement = document.getElementById("protocol-fallback")