summaryrefslogtreecommitdiff
path: root/static
diff options
context:
space:
mode:
authorTom Smeding <tom@tomsmeding.com>2022-09-04 20:21:56 +0200
committerTom Smeding <tom@tomsmeding.com>2022-09-04 20:23:09 +0200
commit63712199736057d78a9adf19d57a9255aaf05307 (patch)
tree08f98763766b2ea8106e4b63e13b9c7a604caa1a /static
parent0116c966d3d6ea914ec4b9e3e5ec6e405d37f22d (diff)
New items have 1 vote
Diffstat (limited to 'static')
-rw-r--r--static/index.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/static/index.js b/static/index.js
index 31099d6..311afc7 100644
--- a/static/index.js
+++ b/static/index.js
@@ -141,9 +141,11 @@ function submitNewItem(string) {
}
}
- socket.emit("new", string);
+ const votes = 1;
- insertItem(0, string);
+ socket.emit("new", votes, string);
+
+ insertItem(votes, string);
}
function upvoteItem(string, incr) {