Re:Tell HN: Thank you for not redesigning Hacker News
by xur17 on Sunday September 01, 2019 @08:43PM
(#20855931)
You'd need some frontend code to hide the upvote icon though.
[ Parent
| on HN ]
Re:Tell HN: Thank you for not redesigning Hacker News
by Deimorz on Sunday September 01, 2019 @09:14PM
(#20856056)
That frontend code already exists and does that every time you vote (line 27 of https://news.ycombinator.com/hn.js). The response content isn't used for anything at all.
Re:Tell HN: Thank you for not redesigning Hacker News
by zeta0134 on Sunday September 01, 2019 @10:32PM
(#20856368)
Nice! I hadn't actually looked at the code before writing my comment. That does seem relatively trivial, so I stand corrected. I didn't realize the clientside code was discarding the response; I sorta naively assumed it was doing a DOM replacement or something equally straightforward.
What a pleasantly tiny script file. More site code should be this easy to read.
Re:Tell HN: Thank you for not redesigning Hacker News
by samtheprogram on Sunday September 01, 2019 @11:59PM
(#20856681)
If you have JavaScript disabled, the response content is used to hide the upvote sign.