custom javascript error
-
Hi,
when i paste the ads code i'm getting this error? what can i do?
my nodebb version : v1.13.2whole js:
<script type="text/javascript">
var infolinks_pid = 3333333;
var infolinks_wsid = 0;
</script>
<script type="text/javascript" src="//resources.infolinks.com/js/infolinks_main.js"></script>and other question is , when i want to paste another js codes , is it below this code?
-
Just a correction: it's not that you don't need the
<script>
- it's just illegal unless you're writing something like jsx. When run this will immediatly causeUncaught SyntaxError: Unexpected token '<'
- because everything you put in custom Javascript is already put into a <script> tag.
If you want to include another script either use some kind of imports (for example es modules) that works inside JS, or put the<script src="">
tag in custom header instead.