about summary refs log tree commit diff stats
path: root/src/pages
diff options
context:
space:
mode:
Diffstat (limited to 'src/pages')
-rw-r--r--src/pages/options/widgets/services.ejs29
-rw-r--r--src/pages/options/widgets/services.js19
2 files changed, 15 insertions, 33 deletions
diff --git a/src/pages/options/widgets/services.ejs b/src/pages/options/widgets/services.ejs
index ea93b1ce..20b4e8fa 100644
--- a/src/pages/options/widgets/services.ejs
+++ b/src/pages/options/widgets/services.ejs
@@ -46,28 +46,29 @@
     <% for (const network in config.networks) { -%>
     <div class="<%= network %>">
       <div class="some-block option-block">
-        <h4 data-localise="__MSG_defaultInstances__">Default Instances</h4>
+        <h4><%= network.charAt(0).toUpperCase() + network.slice(1) %></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.networks[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>
     <% } %>
+    <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 %>.com" 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>
   <% } _%> <% } %>
 </section>
diff --git a/src/pages/options/widgets/services.js b/src/pages/options/widgets/services.js
index 351d45e5..e9577260 100644
--- a/src/pages/options/widgets/services.js
+++ b/src/pages/options/widgets/services.js
@@ -60,25 +60,6 @@ function changeFrontendsSettings(service) {
 	}
 }
 
-function changeNetworkSettings() {
-	for (const service in config.services) {
-		for (const frontend in config.services[service].frontends) {
-			if (config.services[service].frontends[frontend].instanceList) {
-				const frontendDiv = document.getElementById(frontend)
-				for (const network in config.networks) {
-					const networkDiv = frontendDiv.getElementsByClassName(network)[0]
-					if (network == options.network) {
-						networkDiv.style.display = "block"
-					} else {
-						networkDiv.style.display = "none"
-					}
-				}
-			}
-		}
-	}
-}
-
-changeNetworkSettings()
 for (const service in config.services) {
 	divs[service] = {}
 	//divs[service].page = document.getElementById(`${service}_page`)