mirror of
https://gitlab.com/commento/commento.git
synced 2025-06-28 22:55:39 -04:00
commento.js: undo changes on failed vote
This commit is contained in:
@ -977,6 +977,10 @@
|
||||
post(origin + "/api/comment/vote", json, function(resp) {
|
||||
if (!resp.success) {
|
||||
errorShow(resp.message);
|
||||
classRemove(upvote, "upvoted");
|
||||
classRemove(downvote, "downvoted");
|
||||
score.innerText = scorify(parseInt(score.innerText.replace(/[^\d-.]/g, "")) - newDirection + oldDirection);
|
||||
upDownOnclickSet(upvote, downvote, commentHex, oldDirection);
|
||||
return;
|
||||
}
|
||||
});
|
||||
|
Reference in New Issue
Block a user