mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-09-10 00:33:39 +08:00
now using the theme list variable to display themes
This commit is contained in:
parent
4d6bce05bd
commit
4b75844603
1 changed files with 7 additions and 11 deletions
|
@ -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(`<div class="theme active" theme='${theme}'>${theme.replace('_', ' ')}</div>`);
|
||||
} else {
|
||||
themesEl.append(`<div class="theme" theme='${theme}'>${theme.replace('_', ' ')}</div>`);
|
||||
}
|
||||
})
|
||||
});
|
||||
themesList.forEach(theme => {
|
||||
if (config.theme == 'theme') {
|
||||
themesEl.append(`<div class="theme active" theme='${theme}'>${theme.replace('_', ' ')}</div>`);
|
||||
} else {
|
||||
themesEl.append(`<div class="theme" theme='${theme}'>${theme.replace('_', ' ')}</div>`);
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue