about summary refs log tree commit diff stats
path: root/src/pages/popup
diff options
context:
space:
mode:
authorHygna <hygna@proton.me>2022-09-26 18:32:32 +0100
committerHygna <hygna@proton.me>2022-09-26 18:32:32 +0100
commit378fab21c081735311f4b3dab9d3423d955b400b (patch)
tree4d08f4cc4f366564f17c2c80aba5c09455d44b69 /src/pages/popup
parentFinished instance fetching (diff)
downloadlibredirect-378fab21c081735311f4b3dab9d3423d955b400b.zip
Changes
Changed some regex

Made ejs no longer need extra config member variable

Added url reversal
Diffstat (limited to 'src/pages/popup')
-rw-r--r--src/pages/popup/popup.ejs4
-rw-r--r--src/pages/popup/popup.js3
2 files changed, 3 insertions, 4 deletions
diff --git a/src/pages/popup/popup.ejs b/src/pages/popup/popup.ejs
index efb73e5c..5b3bb026 100644
--- a/src/pages/popup/popup.ejs
+++ b/src/pages/popup/popup.ejs
@@ -8,13 +8,13 @@
   </head>
   <body dir="auto">
     <div class="current_site">
-      <%- include('src/pages/widgets/switches', {config: config}) -%>
+      <%- include('src/pages/widgets/switches', {config: {networks, services}}) -%>
       <div id="current_site_divider">
         <hr>
       </div>
     </div>
     <div class="all_sites">
-      <%- include('src/pages/widgets/switches', {config: config}) -%>
+      <%- include('src/pages/widgets/switches', {config: {networks, services}}) -%>
     </div>
     <hr>
     <div class="some-block" id="change_instance_div"><a class="title button prevent" id="change_instance">
diff --git a/src/pages/popup/popup.js b/src/pages/popup/popup.js
index fce451cb..c28f2d94 100644
--- a/src/pages/popup/popup.js
+++ b/src/pages/popup/popup.js
@@ -27,8 +27,7 @@ async function getConfig() {
 		fetch("/config/config.json")
 			.then(response => response.text())
 			.then(data => {
-				const tmp = JSON.parse(data)
-				config = tmp.config
+				config = JSON.parse(data)
 				resolve()
 			})
 	})