about summary refs log tree commit diff stats
path: root/src/pages
diff options
context:
space:
mode:
authorHygna <hygna@proton.me>2022-09-12 18:17:25 +0100
committerHygna <hygna@proton.me>2022-09-12 18:17:25 +0100
commitd6cad17a15e76635d3e51e03b52414e66ef83ac3 (patch)
treed3333f9867e99eea30cc5b67381b07114117de4a /src/pages
parentEmbrace object usage for user-set options (diff)
downloadlibredirect-d6cad17a15e76635d3e51e03b52414e66ef83ac3.zip
Begin work with ejs, created widgets/services.js
Diffstat (limited to 'src/pages')
-rw-r--r--src/pages/options/index.html58
-rw-r--r--src/pages/options/widgets/about.ejs24
-rw-r--r--src/pages/options/widgets/general.js60
-rw-r--r--src/pages/options/widgets/general.pug2
-rw-r--r--src/pages/options/widgets/imdb.js4
-rw-r--r--src/pages/options/widgets/imdb.pug2
-rw-r--r--src/pages/options/widgets/imgur.js4
-rw-r--r--src/pages/options/widgets/imgur.pug2
-rw-r--r--src/pages/options/widgets/instagram.js4
-rw-r--r--src/pages/options/widgets/instagram.pug2
-rw-r--r--src/pages/options/widgets/lbry.js4
-rw-r--r--src/pages/options/widgets/lbry.pug2
-rw-r--r--src/pages/options/widgets/maps.js4
-rw-r--r--src/pages/options/widgets/maps.pug2
-rw-r--r--src/pages/options/widgets/medium.js4
-rw-r--r--src/pages/options/widgets/medium.pug2
-rw-r--r--src/pages/options/widgets/peertube.js4
-rw-r--r--src/pages/options/widgets/peertube.pug2
-rw-r--r--src/pages/options/widgets/quora.js4
-rw-r--r--src/pages/options/widgets/quora.pug2
-rw-r--r--src/pages/options/widgets/reddit.js4
-rw-r--r--src/pages/options/widgets/reddit.pug4
-rw-r--r--src/pages/options/widgets/reuters.js4
-rw-r--r--src/pages/options/widgets/reuters.pug2
-rw-r--r--src/pages/options/widgets/search.js117
-rw-r--r--src/pages/options/widgets/search.pug8
-rw-r--r--src/pages/options/widgets/sendTargets.js4
-rw-r--r--src/pages/options/widgets/sendTargets.pug2
-rw-r--r--src/pages/options/widgets/services.ejs84
-rw-r--r--src/pages/options/widgets/services.js81
-rw-r--r--src/pages/options/widgets/tiktok.js4
-rw-r--r--src/pages/options/widgets/tiktok.pug2
-rw-r--r--src/pages/options/widgets/translate.js4
-rw-r--r--src/pages/options/widgets/translate.pug4
-rw-r--r--src/pages/options/widgets/twitter.js4
-rw-r--r--src/pages/options/widgets/twitter.pug2
-rw-r--r--src/pages/options/widgets/wikipedia.js4
-rw-r--r--src/pages/options/widgets/wikipedia.pug2
-rw-r--r--src/pages/options/widgets/youtube.js4
-rw-r--r--src/pages/options/widgets/youtube.pug8
-rw-r--r--src/pages/options/widgets/youtubeMusic.js4
-rw-r--r--src/pages/options/widgets/youtubeMusic.pug4
42 files changed, 294 insertions, 254 deletions
diff --git a/src/pages/options/index.html b/src/pages/options/index.html
index 077b3da2..5c0aedd5 100644
--- a/src/pages/options/index.html
+++ b/src/pages/options/index.html
@@ -78,7 +78,7 @@
         <div class="some-block option-block">
           <h4 data-localise="__MSG_protocol__"></h4>
           <select id="protocol">
-            <option value="normal" data-localise="__MSG_normal__">Normal</option>
+            <option value="clearnet" data-localise="__MSG_normal__">Clearnet</option>
             <option value="tor">Tor</option>
             <option value="i2p">I2P</option>
             <option value="loki">Lokinet</option>
@@ -318,7 +318,7 @@
         </div>
         <div id="invidious">
           <hr>
-          <div class="normal">
+          <div class="clearnet">
                         <div class="some-block option-block">
                           <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4>
                         </div>
@@ -414,7 +414,7 @@
         </div>
         <div id="piped">
           <hr>
-          <div class="normal">
+          <div class="clearnet">
                         <div class="some-block option-block">
                           <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4>
                         </div>
@@ -510,7 +510,7 @@
         </div>
         <div id="pipedMaterial">
           <hr>
-          <div class="normal">
+          <div class="clearnet">
                         <div class="some-block option-block">
                           <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4>
                         </div>
@@ -606,7 +606,7 @@
         </div>
         <div id="cloudtube">
           <hr>
-          <div class="normal">
+          <div class="clearnet">
                         <div class="some-block option-block">
                           <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4>
                         </div>
@@ -720,7 +720,7 @@
         </div>
         <div id="beatbump">
           <hr>
-          <div class="normal">
+          <div class="clearnet">
                         <div class="some-block option-block">
                           <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4>
                         </div>
@@ -816,7 +816,7 @@
         </div>
         <div id="hyperpipe">
           <hr>
-          <div class="normal">
+          <div class="clearnet">
                         <div class="some-block option-block">
                           <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4>
                         </div>
@@ -931,7 +931,7 @@
         </div>
         <div id="nitter">
           <hr>
-          <div class="normal">
+          <div class="clearnet">
                         <div class="some-block option-block">
                           <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4>
                         </div>
@@ -1038,7 +1038,7 @@
         </div>
         <div id="bibliogram">
           <hr>
-          <div class="normal">
+          <div class="clearnet">
                         <div class="some-block option-block">
                           <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4>
                         </div>
@@ -1145,7 +1145,7 @@
         </div>
         <div id="proxiTok">
           <hr>
-          <div class="normal">
+          <div class="clearnet">
                         <div class="some-block option-block">
                           <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4>
                         </div>
@@ -1259,7 +1259,7 @@
         </div>
         <div id="libreddit">
           <hr>
-          <div class="normal">
+          <div class="clearnet">
                         <div class="some-block option-block">
                           <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4>
                         </div>
@@ -1355,7 +1355,7 @@
         </div>
         <div id="teddit">
           <hr>
-          <div class="normal">
+          <div class="clearnet">
                         <div class="some-block option-block">
                           <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4>
                         </div>
@@ -1462,7 +1462,7 @@
         </div>
         <div id="rimgo">
           <hr>
-          <div class="normal">
+          <div class="clearnet">
                         <div class="some-block option-block">
                           <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4>
                         </div>
@@ -1569,7 +1569,7 @@
         </div>
         <div id="wikiless">
           <hr>
-          <div class="normal">
+          <div class="clearnet">
                         <div class="some-block option-block">
                           <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4>
                         </div>
@@ -1676,7 +1676,7 @@
         </div>
         <div id="scribe">
           <hr>
-          <div class="normal">
+          <div class="clearnet">
                         <div class="some-block option-block">
                           <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4>
                         </div>
@@ -1783,7 +1783,7 @@
         </div>
         <div id="quetre">
           <hr>
-          <div class="normal">
+          <div class="clearnet">
                         <div class="some-block option-block">
                           <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4>
                         </div>
@@ -1890,7 +1890,7 @@
         </div>
         <div id="libremdb">
           <hr>
-          <div class="normal">
+          <div class="clearnet">
                         <div class="some-block option-block">
                           <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4>
                         </div>
@@ -1997,7 +1997,7 @@
         </div>
         <div id="neuters">
           <hr>
-          <div class="normal">
+          <div class="clearnet">
                         <div class="some-block option-block">
                           <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4>
                         </div>
@@ -2104,7 +2104,7 @@
         </div>
         <div id="simpleertube">
           <hr>
-          <div class="normal">
+          <div class="clearnet">
                         <div class="some-block option-block">
                           <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4>
                         </div>
@@ -2226,7 +2226,7 @@
         </div>
         <div id="librarian">
           <hr>
-          <div class="normal">
+          <div class="clearnet">
                         <div class="some-block option-block">
                           <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4>
                         </div>
@@ -2345,7 +2345,7 @@
         </div>
         <div id="searx">
           <hr>
-          <div class="normal">
+          <div class="clearnet">
                         <div class="some-block option-block">
                           <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4>
                         </div>
@@ -2441,7 +2441,7 @@
         </div>
         <div id="searxng">
           <hr>
-          <div class="normal">
+          <div class="clearnet">
                         <div class="some-block option-block">
                           <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4>
                         </div>
@@ -2537,7 +2537,7 @@
         </div>
         <div id="whoogle">
           <hr>
-          <div class="normal">
+          <div class="clearnet">
                         <div class="some-block option-block">
                           <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4>
                         </div>
@@ -2633,7 +2633,7 @@
         </div>
         <div id="librex">
           <hr>
-          <div class="normal">
+          <div class="clearnet">
                         <div class="some-block option-block">
                           <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4>
                         </div>
@@ -2747,7 +2747,7 @@
         </div>
         <hr>
         <div id="simplyTranslate">
-          <div class="normal">
+          <div class="clearnet">
                         <div class="some-block option-block">
                           <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4>
                         </div>
@@ -2842,7 +2842,7 @@
           </div>
         </div>
         <div id="lingva">
-          <div class="normal">
+          <div class="clearnet">
                         <div class="some-block option-block">
                           <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4>
                         </div>
@@ -2956,7 +2956,7 @@
         </div>
         <div id="facil">
           <hr>
-          <div class="normal">
+          <div class="clearnet">
                         <div class="some-block option-block">
                           <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4>
                         </div>
@@ -3063,7 +3063,7 @@
         </div>
         <div id="send">
           <hr>
-          <div class="normal">
+          <div class="clearnet">
                         <div class="some-block option-block">
                           <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4>
                         </div>
@@ -3186,4 +3186,4 @@
     </div>
   </body>
   <script type="module" src="./index.js"></script>
-</html>
+</html>
\ No newline at end of file
diff --git a/src/pages/options/widgets/about.ejs b/src/pages/options/widgets/about.ejs
new file mode 100644
index 00000000..99202141
--- /dev/null
+++ b/src/pages/options/widgets/about.ejs
@@ -0,0 +1,24 @@
+<section class="option-block" id="about_page"> 
+<div class="some-block option-block">
+  <h1 data-localise="__MSG_about__">About</h1>
+</div>
+<hr>
+<div class="about">
+  <div class="some-block option-block">
+    <h4>Donate: ♥️</h4>
+    <h4><a href='https://libredirect.github.io/donate'>https://libredirect.github.io/donate</a> </h4>
+  </div>
+  <div class="some-block option-block">
+    <h4>FAQ:</h4>
+    <h4><a href='https://libredirect.github.io/faq'>https://libredirect.github.io/faq</a></h4>
+  </div>
+  <div class="some-block option-block">
+    <h4>Docs:</h4>
+    <h4><a href='https://libredirect.github.io/docs'>https://libredirect.github.io/docs</a></h4>
+  </div>
+  <div class="some-block option-block">
+    <h4>Source Code:</h4>
+    <h4><a href='https://libredirect.github.io/source_code'>https://libredirect.github.io/source_code</a></h4>
+  </div>
+</div>
+</section>
diff --git a/src/pages/options/widgets/general.js b/src/pages/options/widgets/general.js
index d6824251..e573b4ee 100644
--- a/src/pages/options/widgets/general.js
+++ b/src/pages/options/widgets/general.js
@@ -3,25 +3,7 @@ window.browser = window.browser || window.chrome
 
 import utils from "../../../assets/javascripts/utils.js"
 import generalHelper from "../../../assets/javascripts/general.js"
-
-import youtubeHelper from "../../../assets/javascripts/youtube/youtube.js"
-import youtubeMusicHelper from "../../../assets/javascripts/youtubeMusic.js"
-import twitterHelper from "../../../assets/javascripts/twitter.js"
-import instagramHelper from "../../../assets/javascripts/instagram.js"
-import redditHelper from "../../../assets/javascripts/reddit.js"
-import searchHelper from "../../../assets/javascripts/search.js"
-import translateHelper from "../../../assets/javascripts/translate/translate.js"
-import mapsHelper from "../../../assets/javascripts/maps.js"
-import wikipediaHelper from "../../../assets/javascripts/wikipedia.js"
-import mediumHelper from "../../../assets/javascripts/medium.js"
-import quoraHelper from "../../../assets/javascripts/quora.js"
-import libremdbHelper from "../../../assets/javascripts/imdb.js"
-import reutersHelper from "../../../assets/javascripts/reuters.js"
-import imgurHelper from "../../../assets/javascripts/imgur.js"
-import tiktokHelper from "../../../assets/javascripts/tiktok.js"
-import sendTargetsHelper from "../../../assets/javascripts/sendTargets.js"
-import peertubeHelper from "../../../assets/javascripts/peertube.js"
-import lbryHelper from "../../../assets/javascripts/lbry.js"
+import servicesHelper from "../../../assets/javascripts/services.js"
 
 let updateInstancesElement = document.getElementById("update-instances")
 updateInstancesElement.addEventListener("click", async () => {
@@ -82,28 +64,10 @@ resetSettings.addEventListener("click", async () => {
 			.then(async data => {
 				browser.storage.local.set({ cloudflareBlackList: JSON.parse(data).cloudflare }, () => {
 					browser.storage.local.set({ offlineBlackList: JSON.parse(data).offline }, () => {
-					browser.storage.local.set({ authenticateBlackList: JSON.parse(data).authenticate }, async () => {
-						await generalHelper.initDefaults()
-						await youtubeHelper.initDefaults()
-						await youtubeMusicHelper.initDefaults()
-						await twitterHelper.initDefaults()
-						await instagramHelper.initDefaults()
-						await mapsHelper.initDefaults()
-						await searchHelper.initDefaults()
-						await translateHelper.initDefaults()
-						await mediumHelper.initDefaults()
-						await quoraHelper.initDefaults()
-						await libremdbHelper.initDefaults()
-						await reutersHelper.initDefaults()
-						await redditHelper.initDefaults()
-						await wikipediaHelper.initDefaults()
-						await imgurHelper.initDefaults()
-						await tiktokHelper.initDefaults()
-						await sendTargetsHelper.initDefaults()
-						await peertubeHelper.initDefaults()
-						await lbryHelper.initDefaults()
-						location.reload()
-					})
+						browser.storage.local.set({ authenticateBlackList: JSON.parse(data).authenticate }, async () => {
+							await servicesHelper.initDefaults()
+							location.reload()
+						})
 					})
 				})
 			})
@@ -125,13 +89,13 @@ themeElement.addEventListener("change", event => {
 let protocolElement = document.getElementById("protocol")
 protocolElement.addEventListener("change", event => {
 	const value = event.target.options[protocol.selectedIndex].value
-	browser.storage.local.set({ protocol: value })
+	browser.storage.local.set({ network: value })
 	location.reload()
 })
 
 let protocolFallbackCheckbox = document.getElementById("protocol-fallback-checkbox")
 protocolFallbackCheckbox.addEventListener("change", event => {
-	browser.storage.local.set({ protocolFallback: event.target.checked })
+	browser.storage.local.set({ networkFallback: event.target.checked })
 })
 
 let latencyOutput = document.getElementById("latency-output")
@@ -166,21 +130,21 @@ browser.storage.local.get(
 		"theme",
 		"autoRedirect",
 		"exceptions",
-		"protocol",
-		"protocolFallback",
+		"network",
+		"networkFallback",
 		"latencyThreshold",
 		// 'firstPartyIsolate'
 	],
 	r => {
 		autoRedirectElement.checked = r.autoRedirect
 		themeElement.value = r.theme
-		protocolElement.value = r.protocol
-		protocolFallbackCheckbox.checked = r.protocolFallback
+		protocolElement.value = r.network
+		protocolFallbackCheckbox.checked = r.networkFallback
 		latencyOutput.value = r.latencyThreshold
 		// firstPartyIsolate.checked = r.firstPartyIsolate;
 
 		let protocolFallbackElement = document.getElementById("protocol-fallback")
-		if (protocolElement.value == "normal") {
+		if (protocolElement.value == "clearnet") {
 			protocolFallbackElement.style.display = "none"
 		} else {
 			protocolFallbackElement.style.display = "block"
diff --git a/src/pages/options/widgets/general.pug b/src/pages/options/widgets/general.pug
index e523d5bb..be3d495e 100644
--- a/src/pages/options/widgets/general.pug
+++ b/src/pages/options/widgets/general.pug
@@ -17,7 +17,7 @@ section#general_page.option-block
     .some-block.option-block
         h4(data-localise="__MSG_protocol__")
         select#protocol
-            option(value="normal" data-localise="__MSG_normal__") Normal
+            option(value="clearnet" data-localise="__MSG_normal__") Clearnet
             option(value="tor") Tor
             option(value="i2p") I2P
             option(value="loki") Lokinet
diff --git a/src/pages/options/widgets/imdb.js b/src/pages/options/widgets/imdb.js
index 094c5672..f04bef20 100644
--- a/src/pages/options/widgets/imdb.js
+++ b/src/pages/options/widgets/imdb.js
@@ -3,7 +3,7 @@ import utils from "../../../assets/javascripts/utils.js"
 // UNCOMMENT ALL COMMENTS ONCE OTHER FRONTENDS EXIST
 
 const frontends = new Array("libremdb")
-const protocols = new Array("normal", "tor", "i2p", "loki")
+const protocols = new Array("clearnet", "tor", "i2p", "loki")
 
 const enable = document.getElementById("imdb-enable")
 const imdb = document.getElementById("imdb_page")
@@ -39,7 +39,7 @@ function changeProtocolSettings() {
 
 browser.storage.local.get(["disableImdb", "protocol"], r => {
 	enable.checked = !r.disableImdb
-	protocol = r.protocol
+	protocol = r.network
 	changeProtocolSettings()
 })
 
diff --git a/src/pages/options/widgets/imdb.pug b/src/pages/options/widgets/imdb.pug
index 008e1c00..67eb8eca 100644
--- a/src/pages/options/widgets/imdb.pug
+++ b/src/pages/options/widgets/imdb.pug
@@ -8,7 +8,7 @@ section#imdb_page.option-block
 
     #libremdb
         hr
-        .normal
+        .clearnet
             include ../../widgets/instances.pug
             +instances('https://libremdb.com')
             include ../../widgets/latency.pug
diff --git a/src/pages/options/widgets/imgur.js b/src/pages/options/widgets/imgur.js
index 236e809d..0272b94e 100644
--- a/src/pages/options/widgets/imgur.js
+++ b/src/pages/options/widgets/imgur.js
@@ -3,7 +3,7 @@ import utils from "../../../assets/javascripts/utils.js"
 // UNCOMMENT ALL COMMENTS ONCE OTHER FRONTENDS EXIST
 
 const frontends = new Array("rimgo")
-const protocols = new Array("normal", "tor", "i2p", "loki")
+const protocols = new Array("clearnet", "tor", "i2p", "loki")
 
 const enable = document.getElementById("imgur-enable")
 const imgur = document.getElementById("imgur_page")
@@ -39,7 +39,7 @@ function changeProtocolSettings() {
 
 browser.storage.local.get(["disableImgur", "protocol"], r => {
 	enable.checked = !r.disableImgur
-	protocol = r.protocol
+	protocol = r.network
 	changeProtocolSettings()
 })
 
diff --git a/src/pages/options/widgets/imgur.pug b/src/pages/options/widgets/imgur.pug
index eacd066e..46c497ec 100644
--- a/src/pages/options/widgets/imgur.pug
+++ b/src/pages/options/widgets/imgur.pug
@@ -9,7 +9,7 @@ section#imgur_page.option-block
 
     #rimgo
         hr
-        .normal
+        .clearnet
             include ../../widgets/instances.pug
             +instances('https://rimgo.com')
             include ../../widgets/latency.pug
diff --git a/src/pages/options/widgets/instagram.js b/src/pages/options/widgets/instagram.js
index e22f720f..f8301ae7 100644
--- a/src/pages/options/widgets/instagram.js
+++ b/src/pages/options/widgets/instagram.js
@@ -3,7 +3,7 @@ import utils from "../../../assets/javascripts/utils.js"
 // UNCOMMENT ALL COMMENTS ONCE OTHER FRONTENDS EXIST
 
 const frontends = new Array("bibliogram")
-const protocols = new Array("normal", "tor", "i2p", "loki")
+const protocols = new Array("clearnet", "tor", "i2p", "loki")
 
 const enable = document.getElementById("instagram-enable")
 const instagram = document.getElementById("instagram_page")
@@ -39,7 +39,7 @@ function changeProtocolSettings() {
 
 browser.storage.local.get(["disableInstagram", "protocol"], r => {
 	enable.checked = !r.disableInstagram
-	protocol = r.protocol
+	protocol = r.network
 	changeProtocolSettings()
 })
 
diff --git a/src/pages/options/widgets/instagram.pug b/src/pages/options/widgets/instagram.pug
index cc72f787..702aa651 100644
--- a/src/pages/options/widgets/instagram.pug
+++ b/src/pages/options/widgets/instagram.pug
@@ -9,7 +9,7 @@ section#instagram_page.option-block
 
     #bibliogram
         hr
-        .normal
+        .clearnet
             include ../../widgets/instances.pug
             +instances('https://bibliogram.com')
             include ../../widgets/latency.pug
diff --git a/src/pages/options/widgets/lbry.js b/src/pages/options/widgets/lbry.js
index d50de843..970f9130 100644
--- a/src/pages/options/widgets/lbry.js
+++ b/src/pages/options/widgets/lbry.js
@@ -1,7 +1,7 @@
 import utils from "../../../assets/javascripts/utils.js"
 
 const frontends = new Array("librarian")
-const protocols = new Array("normal", "tor", "i2p", "loki")
+const protocols = new Array("clearnet", "tor", "i2p", "loki")
 
 const enable = document.getElementById("lbry-enable")
 const lbry = document.getElementById("lbry_page")
@@ -36,7 +36,7 @@ function changeProtocolSettings() {
 
 browser.storage.local.get(["disableLbryTargets", "protocol", "lbryFrontend", "lbryRedirectType"], r => {
 	enable.checked = !r.disableLbryTargets
-	protocol = r.protocol
+	protocol = r.network
 	redirectType.value = r.lbryRedirectType
 	frontend.value = r.lbryFrontend
 	changeFrontendsSettings()
diff --git a/src/pages/options/widgets/lbry.pug b/src/pages/options/widgets/lbry.pug
index e4278438..9f01ebc6 100644
--- a/src/pages/options/widgets/lbry.pug
+++ b/src/pages/options/widgets/lbry.pug
@@ -21,7 +21,7 @@ section#lbry_page.option-block
 
     #librarian
         hr
-        .normal
+        .clearnet
             include ../../widgets/instances.pug
             +instances('https://librarian.com')
             include ../../widgets/latency.pug
diff --git a/src/pages/options/widgets/maps.js b/src/pages/options/widgets/maps.js
index acc8aca8..ba44c0c0 100644
--- a/src/pages/options/widgets/maps.js
+++ b/src/pages/options/widgets/maps.js
@@ -1,7 +1,7 @@
 import utils from "../../../assets/javascripts/utils.js"
 
 const frontends = new Array("facil")
-const protocols = new Array("normal", "tor", "i2p", "loki")
+const protocols = new Array("clearnet", "tor", "i2p", "loki")
 
 const enable = document.getElementById("maps-enable")
 const maps = document.getElementById("maps_page")
@@ -35,7 +35,7 @@ function changeFrontendsSettings() {
 
 browser.storage.local.get(["disableMaps", "protocol", "mapsFrontend"], r => {
 	enable.checked = !r.disableMaps
-	protocol = r.protocol
+	protocol = r.network
 	frontend.value = r.mapsFrontend
 	changeFrontendsSettings()
 	changeProtocolSettings()
diff --git a/src/pages/options/widgets/maps.pug b/src/pages/options/widgets/maps.pug
index 166e6494..66d0d411 100644
--- a/src/pages/options/widgets/maps.pug
+++ b/src/pages/options/widgets/maps.pug
@@ -14,7 +14,7 @@ section#maps_page.option-block
 
     #facil
         hr
-        .normal
+        .clearnet
             include ../../widgets/instances.pug
             +instances('https://facilmap.com')
             include ../../widgets/latency.pug
diff --git a/src/pages/options/widgets/medium.js b/src/pages/options/widgets/medium.js
index 8db5c0f0..c12df456 100644
--- a/src/pages/options/widgets/medium.js
+++ b/src/pages/options/widgets/medium.js
@@ -3,7 +3,7 @@ import utils from "../../../assets/javascripts/utils.js"
 // UNCOMMENT ALL COMMENTS ONCE OTHER FRONTENDS EXIST
 
 const frontends = new Array("scribe")
-const protocols = new Array("normal", "tor", "i2p", "loki")
+const protocols = new Array("clearnet", "tor", "i2p", "loki")
 
 const enable = document.getElementById("medium-enable")
 const medium = document.getElementById("medium_page")
@@ -39,7 +39,7 @@ function changeProtocolSettings() {
 
 browser.storage.local.get(["disableMedium", "protocol"], r => {
 	enable.checked = !r.disableMedium
-	protocol = r.protocol
+	protocol = r.network
 	changeProtocolSettings()
 })
 
diff --git a/src/pages/options/widgets/medium.pug b/src/pages/options/widgets/medium.pug
index 4eef0511..60223fdf 100644
--- a/src/pages/options/widgets/medium.pug
+++ b/src/pages/options/widgets/medium.pug
@@ -8,7 +8,7 @@ section#medium_page.option-block
 
     #scribe
         hr
-        .normal
+        .clearnet
             include ../../widgets/instances.pug
             +instances('https://scribe.com')
             include ../../widgets/latency.pug
diff --git a/src/pages/options/widgets/peertube.js b/src/pages/options/widgets/peertube.js
index e3b8dcc5..ca2be429 100644
--- a/src/pages/options/widgets/peertube.js
+++ b/src/pages/options/widgets/peertube.js
@@ -3,7 +3,7 @@ import utils from "../../../assets/javascripts/utils.js"
 // UNCOMMENT ALL COMMENTS ONCE OTHER FRONTENDS EXIST
 
 const frontends = new Array("simpleertube")
-const protocols = new Array("normal", "tor", "i2p", "loki")
+const protocols = new Array("clearnet", "tor", "i2p", "loki")
 
 const enable = document.getElementById("peertube-enable")
 const peertube = document.getElementById("peertube_page")
@@ -39,7 +39,7 @@ function changeProtocolSettings() {
 
 browser.storage.local.get(["disablePeertubeTargets", "protocol"], r => {
 	enable.checked = !r.disablePeertubeTargets
-	protocol = r.protocol
+	protocol = r.network
 	changeProtocolSettings()
 })
 
diff --git a/src/pages/options/widgets/peertube.pug b/src/pages/options/widgets/peertube.pug
index 38690d04..2b818df4 100644
--- a/src/pages/options/widgets/peertube.pug
+++ b/src/pages/options/widgets/peertube.pug
@@ -8,7 +8,7 @@ section#peertube_page.option-block
 
     #simpleertube
         hr
-        .normal
+        .clearnet
             include ../../widgets/instances.pug
             +instances('https://simpleertube.com')
             include ../../widgets/latency.pug
diff --git a/src/pages/options/widgets/quora.js b/src/pages/options/widgets/quora.js
index f3e361c3..c0c0d68f 100644
--- a/src/pages/options/widgets/quora.js
+++ b/src/pages/options/widgets/quora.js
@@ -3,7 +3,7 @@ import utils from "../../../assets/javascripts/utils.js"
 // UNCOMMENT ALL COMMENTS ONCE OTHER FRONTENDS EXIST
 
 const frontends = new Array("quetre")
-const protocols = new Array("normal", "tor", "i2p", "loki")
+const protocols = new Array("clearnet", "tor", "i2p", "loki")
 
 const enable = document.getElementById("quora-enable")
 const quora = document.getElementById("quora_page")
@@ -39,7 +39,7 @@ function changeProtocolSettings() {
 
 browser.storage.local.get(["disableQuora", "protocol"], r => {
 	enable.checked = !r.disableQuora
-	protocol = r.protocol
+	protocol = r.network
 	changeProtocolSettings()
 })
 
diff --git a/src/pages/options/widgets/quora.pug b/src/pages/options/widgets/quora.pug
index 9e45abc9..7c3c52ac 100644
--- a/src/pages/options/widgets/quora.pug
+++ b/src/pages/options/widgets/quora.pug
@@ -8,7 +8,7 @@ section#quora_page.option-block
 
     #quetre
         hr
-        .normal
+        .clearnet
             include ../../widgets/instances.pug
             +instances('https://quetre.com')
             include ../../widgets/latency.pug
diff --git a/src/pages/options/widgets/reddit.js b/src/pages/options/widgets/reddit.js
index c2d16fa3..cae7a764 100644
--- a/src/pages/options/widgets/reddit.js
+++ b/src/pages/options/widgets/reddit.js
@@ -1,7 +1,7 @@
 import utils from "../../../assets/javascripts/utils.js"
 
 const frontends = new Array("libreddit", "teddit")
-const protocols = new Array("normal", "tor", "i2p", "loki")
+const protocols = new Array("clearnet", "tor", "i2p", "loki")
 
 const enable = document.getElementById("reddit-enable")
 const reddit = document.getElementById("reddit_page")
@@ -35,7 +35,7 @@ function changeProtocolSettings() {
 
 browser.storage.local.get(["disableReddit", "protocol", "redditFrontend"], r => {
 	enable.checked = !r.disableReddit
-	protocol = r.protocol
+	protocol = r.network
 	frontend.value = r.redditFrontend
 	changeFrontendsSettings()
 	changeProtocolSettings()
diff --git a/src/pages/options/widgets/reddit.pug b/src/pages/options/widgets/reddit.pug
index 1726f9ce..24c437f4 100644
--- a/src/pages/options/widgets/reddit.pug
+++ b/src/pages/options/widgets/reddit.pug
@@ -14,7 +14,7 @@ section#reddit_page.option-block
 
     #libreddit
         hr
-        .normal
+        .clearnet
             include ../../widgets/instances.pug
             +instances('https://libreddit.com')
             include ../../widgets/latency.pug
@@ -31,7 +31,7 @@ section#reddit_page.option-block
 
     #teddit
         hr
-        .normal
+        .clearnet
             include ../../widgets/instances.pug
             +instances('https://teddit.com')
             +latency('teddit')
diff --git a/src/pages/options/widgets/reuters.js b/src/pages/options/widgets/reuters.js
index d8c937e4..58299969 100644
--- a/src/pages/options/widgets/reuters.js
+++ b/src/pages/options/widgets/reuters.js
@@ -3,7 +3,7 @@ import utils from "../../../assets/javascripts/utils.js"
 // UNCOMMENT ALL COMMENTS ONCE OTHER FRONTENDS EXIST
 
 const frontends = new Array("neuters")
-const protocols = new Array("normal", "tor", "i2p", "loki")
+const protocols = new Array("clearnet", "tor", "i2p", "loki")
 
 const enable = document.getElementById("reuters-enable")
 const reuters = document.getElementById("reuters_page")
@@ -39,7 +39,7 @@ function changeProtocolSettings() {
 
 browser.storage.local.get(["disableReuters", "protocol"], r => {
 	enable.checked = !r.disableReuters
-	protocol = r.protocol
+	protocol = r.network
 	changeProtocolSettings()
 })
 
diff --git a/src/pages/options/widgets/reuters.pug b/src/pages/options/widgets/reuters.pug
index 08a37d50..985965a1 100644
--- a/src/pages/options/widgets/reuters.pug
+++ b/src/pages/options/widgets/reuters.pug
@@ -8,7 +8,7 @@ section#reuters_page.option-block
 
     #neuters
         hr
-        .normal
+        .clearnet
             include ../../widgets/instances.pug
             +instances('https://neuters.com')
             include ../../widgets/latency.pug
diff --git a/src/pages/options/widgets/search.js b/src/pages/options/widgets/search.js
index 3301cd70..aa0aa94d 100644
--- a/src/pages/options/widgets/search.js
+++ b/src/pages/options/widgets/search.js
@@ -5,7 +5,7 @@ import utils from "../../../assets/javascripts/utils.js"
 
 // ONCE FINISHED: add librex and see if it works
 const frontends = new Array("searx", "searxng", "whoogle", "librex") // Add librex once /javascripts/search.js is made agnostic
-const protocols = new Array("normal", "tor", "i2p", "loki")
+const protocols = new Array("clearnet", "tor", "i2p", "loki")
 //let frontendProtocols = (frontends.length)
 
 // I will leave comments of my privious attemps so that people can learn from my mistakes. :)
@@ -29,12 +29,6 @@ for (var i = 0; i < frontends.length; i++) {
 }
 */
 
-/*
-const searxDiv = document.getElementById("searx");
-const searxngDiv = document.getElementById("searxng");
-const whoogleDiv = document.getElementById("whoogle");
-*/
-
 const enable = document.getElementById("search-enable")
 const search = document.getElementById("search_page")
 const frontend = document.getElementById("search-frontend")
@@ -49,33 +43,6 @@ function changeFrontendsSettings() {
 			frontendDiv.style.display = "none"
 		}
 	}
-
-	/*
-  if (frontend.value == 'searx') {
-    searxDiv.style.display = 'block';
-    searxngDiv.style.display = 'none';
-    whoogleDiv.style.display = 'none';
-    librexDiv.style.display = 'none';
-  }
-  else if (frontend.value == 'searxng') {
-    searxDiv.style.display = 'none';
-    searxngDiv.style.display = 'block';
-    whoogleDiv.style.display = 'none';
-    librexDiv.style.display = 'none';
-  }
-  else if (frontend.value == 'whoogle') {
-    searxDiv.style.display = 'none';
-    searxngDiv.style.display = 'none';
-    whoogleDiv.style.display = 'block';
-    librexDiv.style.display = 'none';
-  }
-  else if (frontend.value == 'librex') {
-    searxDiv.style.display = 'none';
-    searxDiv.style.display = 'none';
-    searxngDiv.style.display = 'none';
-    librexDiv.style.display = 'block';
-  }
-  */
 }
 
 function changeProtocolSettings() {
@@ -97,75 +64,12 @@ function changeProtocolSettings() {
     }
     */
 	}
-
-	/*
-    * "Legacy" code
-  const normalsearxDiv = searxDiv.getElementsByClassName("normal")[0];
-  const torsearxDiv = searxDiv.getElementsByClassName("tor")[0];
-  const i2psearxDiv = searxDiv.getElementsByClassName("i2p")[0];
-
-  const normalsearxngDiv = searxngDiv.getElementsByClassName("normal")[0];
-  const torsearxngDiv = searxngDiv.getElementsByClassName("tor")[0];
-  const i2psearxngDiv = searxngDiv.getElementsByClassName("i2p")[0];
-
-  const torwhoogleDiv = whoogleDiv.getElementsByClassName("tor")[0];
-  const i2pwhoogleDiv = whoogleDiv.getElementsByClassName("i2p")[0];
-  const normalwhoogleDiv = whoogleDiv.getElementsByClassName("normal")[0];
-
-  
-  function protocolDisplay(proto) {
-    proto.searxngDiv = 'block'
-  }
-
-  protocolDisplay(protocol.value)
-  
-  
-  if (protocol.value == 'normal') {
-    normalsearxDiv.style.display = 'block';
-    normalsearxngDiv.style.display = 'block';
-    normalwhoogleDiv.style.display = 'block';
-
-    torsearxDiv.style.display = 'none';
-    torsearxngDiv.style.display = 'none';
-    torwhoogleDiv.style.display = 'none';
-
-    i2psearxDiv.style.display = 'none';
-    i2psearxngDiv.style.display = 'none';
-    i2pwhoogleDiv.style.display = 'none';
-  }
-  else if (protocol.value == 'tor') {
-    normalsearxDiv.style.display = 'none';
-    normalsearxngDiv.style.display = 'none';
-    normalwhoogleDiv.style.display = 'none';
-
-    torsearxDiv.style.display = 'block';
-    torsearxngDiv.style.display = 'block';
-    torwhoogleDiv.style.display = 'block';
-
-    i2psearxDiv.style.display = 'none';
-    i2psearxngDiv.style.display = 'none';
-    i2pwhoogleDiv.style.display = 'none';
-  }
-  else if (protocol.value == 'i2p') {
-    normalsearxDiv.style.display = 'none';
-    normalsearxngDiv.style.display = 'none';
-    normalwhoogleDiv.style.display = 'none';
-
-    torsearxDiv.style.display = 'none';
-    torsearxngDiv.style.display = 'none';
-    torwhoogleDiv.style.display = 'none';
-
-    i2psearxDiv.style.display = 'block';
-    i2psearxngDiv.style.display = 'block';
-    i2pwhoogleDiv.style.display = 'block';
-  }
-  */
 }
 
 browser.storage.local.get(["disableSearch", "searchFrontend", "protocol"], r => {
 	enable.checked = !r.disableSearch
 	frontend.value = r.searchFrontend
-	protocol = r.protocol
+	protocol = r.network
 
 	changeFrontendsSettings()
 	changeProtocolSettings()
@@ -185,20 +89,3 @@ search.addEventListener("change", () => {
 	})
 	changeFrontendsSettings()
 })
-
-/*
-  * more "legacy" code
-utils.processDefaultCustomInstances('search', 'searx', 'normal', document);
-utils.processDefaultCustomInstances('search', 'searx', 'tor', document);
-utils.processDefaultCustomInstances('search', 'searx', 'i2p', document);
-utils.processDefaultCustomInstances('search', 'searxng', 'normal', document);
-utils.processDefaultCustomInstances('search', 'searxng', 'tor', document);
-utils.processDefaultCustomInstances('search', 'searxng', 'i2p', document);
-utils.processDefaultCustomInstances('search', 'whoogle', 'normal', document);
-utils.processDefaultCustomInstances('search', 'whoogle', 'tor', document);
-utils.processDefaultCustomInstances('search', 'whoogle', 'i2p', document);
-
-utils.latency('search', 'searx', document, location, true)
-utils.latency('search', 'searxng', document, location, true)
-utils.latency('search', 'whoogle', document, location, true)
-*/
diff --git a/src/pages/options/widgets/search.pug b/src/pages/options/widgets/search.pug
index 8f23350e..f449e0db 100644
--- a/src/pages/options/widgets/search.pug
+++ b/src/pages/options/widgets/search.pug
@@ -19,7 +19,7 @@ section#search_page.option-block
 
     #searx
         hr
-        .normal
+        .clearnet
             include ../../widgets/instances.pug
             +instances('https://searx.com')
             include ../../widgets/latency.pug
@@ -36,7 +36,7 @@ section#search_page.option-block
 
     #searxng
         hr
-        .normal
+        .clearnet
             include ../../widgets/instances.pug
             +instances('https://searxng.com')
             +latency('searxng')
@@ -52,7 +52,7 @@ section#search_page.option-block
 
     #whoogle
         hr
-        .normal
+        .clearnet
             include ../../widgets/instances.pug
             +instances('https://whoogle.com')
             +latency('whoogle')
@@ -68,7 +68,7 @@ section#search_page.option-block
 
     #librex
         hr
-        .normal
+        .clearnet
             include ../../widgets/instances.pug
             +instances('https://librex.com')
             +latency('librex')
diff --git a/src/pages/options/widgets/sendTargets.js b/src/pages/options/widgets/sendTargets.js
index 9380a72f..b6acc02c 100644
--- a/src/pages/options/widgets/sendTargets.js
+++ b/src/pages/options/widgets/sendTargets.js
@@ -3,7 +3,7 @@ import utils from "../../../assets/javascripts/utils.js"
 // UNCOMMENT ALL COMMENTS ONCE OTHER FRONTENDS EXIST
 
 const frontends = new Array("send")
-const protocols = new Array("normal", "tor", "i2p", "loki")
+const protocols = new Array("clearnet", "tor", "i2p", "loki")
 
 const enable = document.getElementById("sendTargets-enable")
 const sendTargets = document.getElementById("sendTargets_page")
@@ -39,7 +39,7 @@ function changeProtocolSettings() {
 
 browser.storage.local.get(["disableSendTarget", "protocol"], r => {
 	enable.checked = !r.disableSendTarget
-	protocol = r.protocol
+	protocol = r.network
 	changeProtocolSettings()
 })
 
diff --git a/src/pages/options/widgets/sendTargets.pug b/src/pages/options/widgets/sendTargets.pug
index fc2e9e73..e7676b37 100644
--- a/src/pages/options/widgets/sendTargets.pug
+++ b/src/pages/options/widgets/sendTargets.pug
@@ -8,7 +8,7 @@ section#sendTargets_page.option-block
 
     #send
         hr
-        .normal
+        .clearnet
             include ../../widgets/instances.pug
             +instances('https://send.com')
             include ../../widgets/latency.pug
diff --git a/src/pages/options/widgets/services.ejs b/src/pages/options/widgets/services.ejs
new file mode 100644
index 00000000..14365871
--- /dev/null
+++ b/src/pages/options/widgets/services.ejs
@@ -0,0 +1,84 @@
+<% config.services.forEach(service=>{ %>
+<section class="option-block" id="<%= service =%>_page"</section>
+  <div class="some-block option-block">
+    <h1 data-localise="__MSG_<%= service =%>__"><%= config.services[service].name =%></h1>
+  </div>
+  <hr>
+  <div class="some-block option-block">
+    <h4 data-localise="__MSG_enable__">Enable</h4>
+    <input id="<%= service =%>-enable" type="checkbox">
+  </div>
+  <div class="some-block option-block">
+  <h4 data-localise="__MSG_frontend__">Frontend</h4>
+  <select id="<%= service =%>-frontend">
+    <% config.services[service].frontends.forEach(frontend=>{ %>
+    <option value="<%= frontend =%>"><%= frontend =%></option>
+    <% }); %>
+    <% config.services[service].singleInstanceFrontends.forEach(frontend=>{ %>
+    <option value="<%= frontend =%>"><%= frontend =%></option>
+    <% }); %>
+  </select>
+  </div>
+  <% if (config.services[service].embeddable) { %>
+  <% if (config.services[service].singleInstanceFrontends) { %>
+  <div id="<%= service =%>-embedded_frontend">
+    <div class="some-block option-block">
+      <h4 data-localise="__MSG_embeddedVids__">Embedded Videos Frontend</h4>
+      <select id="<%= service =%>-embed_frontend">
+        <% config.services[service].frontends.forEach(frontend=>{ %>
+        <option value="frontend">frontend</option>
+        <% }); %>
+      </select>
+    </div>
+  </div>
+  <% } %>
+  <div class="some-block option-block">
+    <h4 data-localise="__MSG_redirectType__">Redirect Type</h4>
+    <select id="<%= service =%-redirect_type">
+      <option value="both" data-localise="__MSG_both__">both</option>
+      <option value="onlyEmbedded" data-localise="__MSG_onlyEmbedded__">Only Embedded</option>
+      <option value="onlyNotEmbedded" data-localise="__MSG_onlyNotEmbedded__">Only Not Embedded</option>
+    </select>
+  </div>
+  <% } %>
+  <hr>
+  <% config.services[service].frontends.forEach(frontend=>{ %>
+  <div id="<%= frontend =%>">
+    <% config.networks.forEach(network=>{ %>
+    <div class="<%= network =%>">
+      <div class="some-block option-block">
+        <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4>
+      </div>
+      <div class="checklist"></div>
+      <hr>
+      <div class="some-block option-block">
+        <h4 data-localise="__MSG_customInstances__">Custom Instances</h4>
+      </div>
+      <form class="custom-instance-form">
+        <div class="some-block option-block">
+          <input class="custom-instance" placeholder="http://<%= frontend =%>.<%= config[network].tld =%>" type="url">
+          <button class="add add-instance" type="submit">
+            <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor">
+              <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path>
+            </svg>
+          </button>
+        </div>
+      </form>
+      <div class="checklist custom-checklist"></div>
+      <% if (network == "clearnet") { %>
+      <div class="buttons buttons-inline">
+        <label class="button button-inline" id="latency-<%= frontend =%>-label" for="latency-<%= frontend =%>"> 
+          <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor">
+            <path d="M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"></path>
+          </svg>&nbsp;
+          <x data-localise="__MSG_testInstancesLatency__">Test Instances Latency</x>
+        </label>
+        <input class="button button-inline" id="latency-<%= frontend =%>" style="display:none;">
+      </div>
+      <% } %>
+    </div>
+    <% }); %>
+  <% }); %>
+</section>
+<% }); %>
+<script type="module" src="./widgets/services.js"></script>
\ No newline at end of file
diff --git a/src/pages/options/widgets/services.js b/src/pages/options/widgets/services.js
new file mode 100644
index 00000000..5f370a18
--- /dev/null
+++ b/src/pages/options/widgets/services.js
@@ -0,0 +1,81 @@
+import utils from "../../../assets/javascripts/utils.js"
+
+// const frontends = new Array("librarian")
+// const protocols = new Array("clearnet", "tor", "i2p", "loki")
+
+let config,
+	network,
+	divs = {}
+
+async function getConfig() {
+	return new Promise(resolve => {
+		fetch("/config/config.json")
+			.then(response => response.text())
+			.then(data => {
+				config = JSON.parse(data)
+				resolve()
+			})
+	})
+}
+
+getConfig()
+
+browser.storage.local.get("network", r => {
+	network = r.network
+})
+
+function changeFrontendsSettings(service) {
+	for (const frontend in config.services[service].frontends) {
+		const frontendDiv = document.getElementById(frontend)
+		if (frontend == divs[service].frontend.value) {
+			frontendDiv.style.display = "block"
+		} else {
+			frontendDiv.style.display = "none"
+		}
+	}
+}
+
+function changeNetworkSettings(selectedNetwork) {
+	for (const frontend in config.frontends) {
+		const frontendDiv = document.getElementById(frontend)
+		for (const network in config.networks) {
+			const networkDiv = frontendDiv.getElementsByClassName(network)[0]
+			if (network == selectedNetwork) {
+				networkDiv.style.display = "block"
+			} else {
+				networkDiv.style.display = "none"
+			}
+		}
+	}
+}
+
+for (service in config.services) {
+	divs[service][service] = document.getElementById(`${service}_page`)
+	for (const option in config.services[service].options) {
+		divs[service][option] = document.getElementById(`${service}-${option}`)
+
+		browser.storage.local.get([`${service + utils.camelCase(option)}`], r => {
+			if (typeof config.services[service].options[option] == "boollean") divs[service][option].checked = !r[service + utils.camelCase(option)]
+			else divs[service][option].value = !r[service + utils.camelCase(option)]
+		})
+
+		divs[service][option].addEventListener("change", () => {
+			if (typeof config.services[service].options[option] == "boollean") {
+				browser.storage.local.set({ [service + utils.camelCase(option)]: !divs[service][option].checked })
+			} else {
+				browser.storage.local.set({ [service + utils.camelCase(option)]: divs[service][option].value })
+			}
+			changeFrontendsSettings()
+		})
+	}
+
+	changeFrontendsSettings(service)
+	changeNetworkSettings(network)
+
+	for (const frontend in config.services[service].frontends) {
+		for (const network in config.networks) {
+			utils.processDefaultCustomInstances(service, frontend, network, document)
+		}
+		utils.latency(service, frontend, document, location)
+	}
+}
diff --git a/src/pages/options/widgets/tiktok.js b/src/pages/options/widgets/tiktok.js
index 38ec9ea0..f382ad5a 100644
--- a/src/pages/options/widgets/tiktok.js
+++ b/src/pages/options/widgets/tiktok.js
@@ -3,7 +3,7 @@ import utils from "../../../assets/javascripts/utils.js"
 // UNCOMMENT ALL COMMENTS ONCE OTHER FRONTENDS EXIST
 
 const frontends = new Array("proxiTok")
-const protocols = new Array("normal", "tor", "i2p", "loki")
+const protocols = new Array("clearnet", "tor", "i2p", "loki")
 
 const enable = document.getElementById("tiktok-enable")
 const tiktok = document.getElementById("tiktok_page")
@@ -39,7 +39,7 @@ function changeProtocolSettings() {
 
 browser.storage.local.get(["disableTiktok", "protocol"], r => {
 	enable.checked = !r.disableTiktok
-	protocol = r.protocol
+	protocol = r.network
 	changeProtocolSettings()
 })
 
diff --git a/src/pages/options/widgets/tiktok.pug b/src/pages/options/widgets/tiktok.pug
index 29ab5e2a..986bd270 100644
--- a/src/pages/options/widgets/tiktok.pug
+++ b/src/pages/options/widgets/tiktok.pug
@@ -8,7 +8,7 @@ section#tiktok_page.option-block
 
     #proxiTok
         hr
-        .normal
+        .clearnet
             include ../../widgets/instances.pug
             +instances('https://proxitok.com')
             include ../../widgets/latency.pug
diff --git a/src/pages/options/widgets/translate.js b/src/pages/options/widgets/translate.js
index e1008139..c70b679f 100644
--- a/src/pages/options/widgets/translate.js
+++ b/src/pages/options/widgets/translate.js
@@ -1,7 +1,7 @@
 import utils from "../../../assets/javascripts/utils.js"
 
 const frontends = new Array("simplyTranslate", "lingva")
-const protocols = new Array("normal", "tor", "i2p", "loki")
+const protocols = new Array("clearnet", "tor", "i2p", "loki")
 
 const enable = document.getElementById("translate-enable")
 const translate = document.getElementById("translate_page")
@@ -36,7 +36,7 @@ function changeProtocolSettings() {
 browser.storage.local.get(["translateDisable", "translateFrontend", "protocol"], r => {
 	enable.checked = !r.translateDisable
 	frontend.value = r.translateFrontend
-	protocol = r.protocol
+	protocol = r.network
 	changeFrontendsSettings()
 	changeProtocolSettings()
 })
diff --git a/src/pages/options/widgets/translate.pug b/src/pages/options/widgets/translate.pug
index 4836c0f3..40d42bca 100644
--- a/src/pages/options/widgets/translate.pug
+++ b/src/pages/options/widgets/translate.pug
@@ -14,7 +14,7 @@ section#translate_page.option-block
 
     hr
     #simplyTranslate
-        .normal
+        .clearnet
             include ../../widgets/instances.pug
             +instances('https://simplytranslate.org')
             include ../../widgets/latency.pug
@@ -30,7 +30,7 @@ section#translate_page.option-block
             +instances('http://simplytranslate.loki')
             
     #lingva
-        .normal
+        .clearnet
             include ../../widgets/instances.pug
             +instances('https://lingvatranslate.com')
             +latency('lingva')
diff --git a/src/pages/options/widgets/twitter.js b/src/pages/options/widgets/twitter.js
index 5ad760b3..52d7a73b 100644
--- a/src/pages/options/widgets/twitter.js
+++ b/src/pages/options/widgets/twitter.js
@@ -3,7 +3,7 @@ import utils from "../../../assets/javascripts/utils.js"
 // UNCOMMENT ALL COMMENTS ONCE OTHER FRONTENDS EXIST
 
 const frontends = new Array("nitter")
-const protocols = new Array("normal", "tor", "i2p", "loki")
+const protocols = new Array("clearnet", "tor", "i2p", "loki")
 
 const enable = document.getElementById("twitter-enable")
 const twitter = document.getElementById("twitter_page")
@@ -40,7 +40,7 @@ function changeProtocolSettings() {
 
 browser.storage.local.get(["disableTwitter", "protocol", "twitterRedirectType"], r => {
 	enable.checked = !r.disableTwitter
-	protocol = r.protocol
+	protocol = r.network
 	redirectType.value = r.twitterRedirectType
 	changeProtocolSettings()
 })
diff --git a/src/pages/options/widgets/twitter.pug b/src/pages/options/widgets/twitter.pug
index 6e610545..fa7f1320 100644
--- a/src/pages/options/widgets/twitter.pug
+++ b/src/pages/options/widgets/twitter.pug
@@ -15,7 +15,7 @@ section#twitter_page.option-block
 
     #nitter
         hr
-        .normal
+        .clearnet
             include ../../widgets/instances.pug
             +instances('https://nitter.com')
             include ../../widgets/latency.pug
diff --git a/src/pages/options/widgets/wikipedia.js b/src/pages/options/widgets/wikipedia.js
index 9d06488b..120af919 100644
--- a/src/pages/options/widgets/wikipedia.js
+++ b/src/pages/options/widgets/wikipedia.js
@@ -3,7 +3,7 @@ import utils from "../../../assets/javascripts/utils.js"
 // UNCOMMENT ALL COMMENTS ONCE OTHER FRONTENDS EXIST
 
 const frontends = new Array("wikiless")
-const protocols = new Array("normal", "tor", "i2p", "loki")
+const protocols = new Array("clearnet", "tor", "i2p", "loki")
 
 const enable = document.getElementById("wikipedia-enable")
 const wikipedia = document.getElementById("wikipedia_page")
@@ -39,7 +39,7 @@ function changeProtocolSettings() {
 
 browser.storage.local.get(["disableWikipedia", "protocol"], r => {
 	enable.checked = !r.disableWikipedia
-	protocol = r.protocol
+	protocol = r.network
 	changeProtocolSettings()
 })
 
diff --git a/src/pages/options/widgets/wikipedia.pug b/src/pages/options/widgets/wikipedia.pug
index c9aee64c..a0ad37c3 100644
--- a/src/pages/options/widgets/wikipedia.pug
+++ b/src/pages/options/widgets/wikipedia.pug
@@ -8,7 +8,7 @@ section#wikipedia_page.option-block
 
     #wikiless
         hr
-        .normal
+        .clearnet
             include ../../widgets/instances.pug
             +instances('https://wikiless.com')
             include ../../widgets/latency.pug
diff --git a/src/pages/options/widgets/youtube.js b/src/pages/options/widgets/youtube.js
index 065a195b..4e4bbbae 100644
--- a/src/pages/options/widgets/youtube.js
+++ b/src/pages/options/widgets/youtube.js
@@ -1,7 +1,7 @@
 import utils from "../../../assets/javascripts/utils.js"
 
 const frontends = new Array("invidious", "piped", "pipedMaterial", "cloudtube")
-const protocols = new Array("normal", "tor", "i2p", "loki")
+const protocols = new Array("clearnet", "tor", "i2p", "loki")
 const singleInstanceFrontends = new Array("freetube", "yatte")
 
 const enable = document.getElementById("youtube-enable")
@@ -66,7 +66,7 @@ browser.storage.local.get(["disableYoutube", "onlyEmbeddedVideo", "youtubeRedire
 	onlyEmbeddedVideo.value = r.onlyEmbeddedVideo
 	youtubeEmbedFrontend.value = r.youtubeEmbedFrontend
 	frontend.value = r.youtubeFrontend
-	protocol = r.protocol
+	protocol = r.network
 
 	changeFrontendsSettings()
 	changeProtocolSettings()
diff --git a/src/pages/options/widgets/youtube.pug b/src/pages/options/widgets/youtube.pug
index 33a43c34..cf48d9be 100644
--- a/src/pages/options/widgets/youtube.pug
+++ b/src/pages/options/widgets/youtube.pug
@@ -34,7 +34,7 @@ section#youtube_page.option-block
 
     #invidious
         hr
-        .normal
+        .clearnet
             include ../../widgets/instances.pug
             +instances('http://invidious.com')
             include ../../widgets/latency.pug
@@ -51,7 +51,7 @@ section#youtube_page.option-block
 
     #piped
         hr
-        .normal
+        .clearnet
             include ../../widgets/instances.pug
             +instances('https://piped.com')
             include ../../widgets/latency.pug
@@ -68,7 +68,7 @@ section#youtube_page.option-block
 
     #pipedMaterial
         hr
-        .normal
+        .clearnet
             include ../../widgets/instances.pug
             +instances('https://piped-material.com')
             include ../../widgets/latency.pug
@@ -85,7 +85,7 @@ section#youtube_page.option-block
 
     #cloudtube
         hr
-        .normal
+        .clearnet
             include ../../widgets/instances.pug
             +instances('https://cloudtube.com')
             include ../../widgets/latency.pug
diff --git a/src/pages/options/widgets/youtubeMusic.js b/src/pages/options/widgets/youtubeMusic.js
index ad51ce7c..bb985b28 100644
--- a/src/pages/options/widgets/youtubeMusic.js
+++ b/src/pages/options/widgets/youtubeMusic.js
@@ -1,7 +1,7 @@
 import utils from "../../../assets/javascripts/utils.js"
 
 const frontends = new Array("beatbump", "hyperpipe")
-const protocols = new Array("normal", "tor", "i2p", "loki")
+const protocols = new Array("clearnet", "tor", "i2p", "loki")
 
 let enable = document.getElementById("youtubeMusic-enable")
 const youtubeMusic = document.getElementById("youtubeMusic_page")
@@ -36,7 +36,7 @@ function changeProtocolSettings() {
 browser.storage.local.get(["disableYoutubeMusic", "youtubeMusicFrontend", "protocol"], r => {
 	enable.checked = !r.disableYoutubeMusic
 	frontend.value = r.youtubeMusicFrontend
-	protocol = r.protocol
+	protocol = r.network
 	changeFrontendsSettings()
 	changeProtocolSettings()
 })
diff --git a/src/pages/options/widgets/youtubeMusic.pug b/src/pages/options/widgets/youtubeMusic.pug
index bcba3d2d..9c2c08cf 100644
--- a/src/pages/options/widgets/youtubeMusic.pug
+++ b/src/pages/options/widgets/youtubeMusic.pug
@@ -14,7 +14,7 @@ section#youtubeMusic_page.option-block
 
     #beatbump
         hr
-        .normal
+        .clearnet
             include ../../widgets/instances.pug
             +instances('https://beatbump.org')
             include ../../widgets/latency.pug
@@ -31,7 +31,7 @@ section#youtubeMusic_page.option-block
 
     #hyperpipe
         hr
-        .normal
+        .clearnet
             include ../../widgets/instances.pug
             +instances('https://hyperpipe.org')
             include ../../widgets/latency.pug