master
Aevann 2024-11-14 18:34:59 +02:00
parent ca2695ca5c
commit 32e5979d3e
1 changed files with 1 additions and 1 deletions

View File

@ -293,7 +293,7 @@ function distinguished_toggle(t, fullname) {
function post_comment(fullname, hide) {
const pids = document.getElementsByClassName('pid') //to account for crosspost embed
if (pids.length) { //need .length, getElementsByClassName is always True
if (pids.length) { //need .length, getElementsByClassName is always truthy
const pid = pids[pids.length - 1].value
const comments = JSON.parse(localStorage.getItem("comment-counts"))
const newTotal = parseInt(comments[pid].c) + 1