mirror of https://github.com/dirtbags/moth.git
puzzles.js: normalize whitespace; sort categories
This commit is contained in:
parent
b85cd306aa
commit
68398a4f91
|
@ -10,7 +10,9 @@ function loadPuzzle(cat, id, points) {
|
|||
function puzzlesRefresh(term, obj) {
|
||||
term.clear();
|
||||
|
||||
for (var cat in obj) {
|
||||
var k = Object.keys(obj);
|
||||
k.sort();
|
||||
k.forEach(function(cat) {
|
||||
var puzzles = obj[cat];
|
||||
|
||||
var pdiv = createElement('div');
|
||||
|
@ -43,7 +45,7 @@ function puzzlesRefresh(term, obj) {
|
|||
}
|
||||
|
||||
term.appendShallow(pdiv);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function puzzles_start() {
|
||||
|
|
Loading…
Reference in New Issue