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.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login