Fix front-end index.js code styles

This commit is contained in:
Wu Cheng-Han 2017-03-22 17:48:26 +08:00
parent 802ed406e6
commit cac618eca8

View file

@ -1987,7 +1987,10 @@ function updateAuthorshipInner () {
ch: preLine.length
}
if (JSON.stringify(prePos) !== JSON.stringify(_postPos)) {
mark.textmarkers.push({ userid: author.userid, pos: [prePos, _postPos] })
mark.textmarkers.push({
userid: author.userid,
pos: [prePos, _postPos]
})
startLine++
}
authorMarks[prePos.line] = mark
@ -2001,7 +2004,10 @@ function updateAuthorshipInner () {
ch: 0
}
if (JSON.stringify(_prePos) !== JSON.stringify(postPos)) {
mark.textmarkers.push({ userid: author.userid, pos: [_prePos, postPos] })
mark.textmarkers.push({
userid: author.userid,
pos: [_prePos, postPos]
})
endLine--
}
authorMarks[postPos.line] = mark
@ -2374,7 +2380,11 @@ function sortOnlineUserList (list) {
if (!usera.idle && userb.idle) { return -1 } else if (usera.idle && !userb.idle) { return 1 } else {
if (usera.name && userb.name && usera.name.toLowerCase() < userb.name.toLowerCase()) {
return -1
} else if (usera.name && userb.name && usera.name.toLowerCase() > userb.name.toLowerCase()) { return 1 } else { if (usera.color && userb.color && usera.color.toLowerCase() < userb.color.toLowerCase()) { return -1 } else if (usera.color && userb.color && usera.color.toLowerCase() > userb.color.toLowerCase()) { return 1 } else { return 0 } }
} else if (usera.name && userb.name && usera.name.toLowerCase() > userb.name.toLowerCase()) {
return 1
} else {
if (usera.color && userb.color && usera.color.toLowerCase() < userb.color.toLowerCase()) { return -1 } else if (usera.color && userb.color && usera.color.toLowerCase() > userb.color.toLowerCase()) { return 1 } else { return 0 }
}
}
}
}