Don't add same line code comment box twice (#11837)
Don't add same line code comment box twice (#11837)

* Don't add same line code comment box twice

Clicking the same '+' button multiple times adds multiple comment boxes
to the same line. Prevent this by assigning a unique key to each comment
box and checking if it already exists in the DOM.

Also cleaned up the code around this a bit.

* Update web_src/js/index.js

Co-authored-by: Lauris BH <f3041c4c693c07149804ea655e75ee8bb856bd26@nix.lv>

Co-authored-by: techknowlogick <ff3785bfdd6690916cd886199c6b899e5f93e2e2@mdranta.net>
Co-authored-by: Lauris BH <f3041c4c693c07149804ea655e75ee8bb856bd26@nix.lv>
Co-authored-by: techknowlogick <274271a2414b6bd0d2eb0401dd4ff6e85d7016a7@gitea.io>
sapk-fork/gitea,cez81/gitea,cez81/gitea,vdbt/gitea,sapk-fork/gitea,go-gitea/gitea,go-gitea/gitea,cez81/gitea,go-gitea/gitea,sapk-fork/gitea,vCaesar/gitea,vCaesar/gitea,sapk-fork/gitea,vdbt/gitea