Whenever I load a post for which I've voted (on main and mobile), it first shows the normal vote buttons, and, a few seconds later, it highlights my vote.
This is annoying because I don't remember my votes, and I tend to tap/click the upvote button again. This leads to an unupvote. I get the "vote locked" popup, usually, but there have been some cases when the unupvote happens successfully.
Some tinkering in the dev tools gives me this (To avoid having to time the screenshot properly, I just disabled JS to make stuff easy for myself)
Right after page load,before JS runs/if JS is disabled:
Wait five seconds/enable JS and refresh:
It seems that the
vote-up-on class is added dynamically, after page load, via JS/jQuery (the same goes for
star-on on the favstar).
Why are we adding CSS classes dynamically? What's wrong with attaching the
star-on classes server-side? I'm not a professional programmer, but this makes me O_0.
This delay is annoying and confusing. Fix please?