diff --git a/web/_js/about.js b/web/_js/about.js index cd874563..7b444d3a 100644 --- a/web/_js/about.js +++ b/web/_js/about.js @@ -11,8 +11,7 @@ fetch('all-authors.txt') .then(text => text.trim().split('\n').sort()) .then(contributors => { document.querySelector('#reddit-contributors-count').textContent = contributors.length - for (const index in contributors) { - contributor = contributors[index] + for (const contributor of contributors) { const userEl = document.createElement('a') userEl.href = 'https://reddit.com/user/' + contributor userEl.textContent = contributor diff --git a/web/_js/main/main.js b/web/_js/main/main.js index c3929004..7a8e4224 100644 --- a/web/_js/main/main.js +++ b/web/_js/main/main.js @@ -77,16 +77,7 @@ async function init() { //let resp = await fetch("../tools/temp-atlas.json") const resp = await fetch("./atlas.json") atlas = await resp.json() - atlas.sort(function (a, b) { - if (a.center[1] < b.center[1]) { - return -1 - } - if (a.center[1] > b.center[1]) { - return 1 - } - // a must be equal to b - return 0 - }) + atlas.sort((a, b) => a.center[1] - b.center[1]) atlasAll = updateAtlasAll(atlas)