From 378fab21c081735311f4b3dab9d3423d955b400b Mon Sep 17 00:00:00 2001 From: Hygna Date: Mon, 26 Sep 2022 18:32:32 +0100 Subject: Changes Changed some regex Made ejs no longer need extra config member variable Added url reversal --- src/pages/popup/popup.ejs | 4 ++-- src/pages/popup/popup.js | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'src/pages/popup') 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 @@
- <%- include('src/pages/widgets/switches', {config: config}) -%> + <%- include('src/pages/widgets/switches', {config: {networks, services}}) -%>

- <%- include('src/pages/widgets/switches', {config: config}) -%> + <%- include('src/pages/widgets/switches', {config: {networks, services}}) -%>

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() }) }) -- cgit 1.4.1