diff --git a/js/app.js b/js/app.js index c2dd604..0fae6cb 100644 --- a/js/app.js +++ b/js/app.js @@ -17,7 +17,9 @@ async function genTree(treeId) { let us = users[entryDat.username]; - let s = 1 / (entries.length+10); + console.log(entryDat); + + let s = Math.pow(0.5,(new Date() - new Date(entryDat.datetime_created.$date)) / (1000*60*60*24)) sum += s; users[entryDat.username] = (us ? us : 0) + s; entry = entryDat.parent_id;