From e0fb937b8b944fdb854be4c1c90f27e3552822d9 Mon Sep 17 00:00:00 2001 From: Jack Date: Thu, 14 May 2020 22:30:39 +0100 Subject: [PATCH] now using the theme list variable to display themes --- public/js/settings.js | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/public/js/settings.js b/public/js/settings.js index 01423bd55..b33eaf850 100644 --- a/public/js/settings.js +++ b/public/js/settings.js @@ -1,17 +1,13 @@ function updateSettingsPage(){ let themesEl = $(".pageSettings .section .themes").empty(); - - $.getJSON("themes/list.json", function(data) { - commandsThemes.list = []; - data.forEach(theme => { - if (config.theme == 'theme') { - themesEl.append(`
${theme.replace('_', ' ')}
`); - } else { - themesEl.append(`
${theme.replace('_', ' ')}
`); - } - }) - }); + themesList.forEach(theme => { + if (config.theme == 'theme') { + themesEl.append(`
${theme.replace('_', ' ')}
`); + } else { + themesEl.append(`
${theme.replace('_', ' ')}
`); + } + })