简体   繁体   中英

JavaScript line added to HTML script bracket make error 500

i have an issue with a webpage that produce error 500 after adding the following line :

discordInvite.init({inviteCode: 'sK5R76jTmu'});

inside the script bracket :

<script src="./discordInvite.js"></script>
<script type="text/javascript">
discordInvite.init({inviteCode: 'sK5R76jTmu'});
discordInvite.render();
</script>

The page work fine without that line only and, if i juste type the commande in consol (chrome consol), the page render the results (typing the script in the order init + render).

For more details about the JS script, here is a link to the original git page : https://github.com/Aegis7Gaming/Discord-Invite-JS-HTML-CSS

and here is the page i'm trying to implement this on : http://www.ats.rf.gd/ (part of the script is in the end of the body)

thanks in advance for your help i can't understand the logic behind it.

I solved the issue by replacing

discordInvite.init({inviteCode: 'sK5R76jTmu'});

by

discordInvite.init({inviteCode: "sK5R76jTmu"});

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM