mirror of
https://github.com/placeAtlas/atlas.git
synced 2024-12-26 20:14:07 +01:00
Small refactoring 8
This commit is contained in:
parent
f577980f9b
commit
7d8eaae1ca
2 changed files with 2 additions and 12 deletions
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in a new issue