I fixed Monarc4YT's code.
بۇلار بۇ قوليازمىنىڭ كود يېڭىلانغان نەشرىلىرى. بارلىق نەشرىنى كۆرسىتىش
While using this, I encounter some problems where it redirects to /battle/user/new instead of repeating the battle, that's why I updated the last part of the code.I used another kind of JS path this time, so let's see if it'll encounter another problems in the future lemao.