Dear @dani
have a look on my test page:
http://www.laytheme.mariusjopen.com/javascript
This is the code which gets triggered
<script>
alert("TEST");
jQuery( "body" ).addClass( "TEST" );
</script>
[image: 1532166521718-bildschirmfoto-2018-07-21-um-11.48.33.png]
The function gets triggered if you open the page with URL or when you open it via another page.
Best!
Marius