Thanks for that hint. I tried to follow the description from this post here, but somehow that didn’t work.
I assume I would have to include the pure javascript into the pubic/my.js file, instead of the line I would normally add to the html part. I just don’t know how to convert the to pure javascript.