mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-02-04 04:51:16 +08:00
commit
24b9d219f0
1 changed files with 8 additions and 1 deletions
|
@ -400,7 +400,14 @@ let themesList;
|
|||
|
||||
$.getJSON("themes/list.json", function(data) {
|
||||
commandsThemes.list = [];
|
||||
themesList = data.sort();
|
||||
themesList = data.sort(function(a, b) {
|
||||
nameA = a.name.toLowerCase(), nameB = b.name.toLowerCase()
|
||||
if (nameA < nameB)
|
||||
return -1
|
||||
if (nameA > nameB)
|
||||
return 1
|
||||
return 0
|
||||
})
|
||||
data.forEach(theme => {
|
||||
commandsThemes.list.push({
|
||||
id: "changeTheme" + capitalizeFirstLetter(theme.name),
|
||||
|
|
Loading…
Reference in a new issue