It fails at any level. I went to Default Theme > Edit CSS/HTML > Common > Header and as an experiment I tried to add
<script>
alert("Test");
</script>
and even that fails with a popup saying “403 error”, so I didn’t even try to do anything more fancy.
I have an installation on DigitalOcean exactly according to the textbook and updated to the latest version. Is it necessary to change anything about the standard installation in order to be able to use Javascript?