commento.js: undo changes on failed vote
This commit is contained in:
parent
295318e6a6
commit
a7cd8066f8
@ -977,6 +977,10 @@
|
|||||||
post(origin + "/api/comment/vote", json, function(resp) {
|
post(origin + "/api/comment/vote", json, function(resp) {
|
||||||
if (!resp.success) {
|
if (!resp.success) {
|
||||||
errorShow(resp.message);
|
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;
|
return;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user