How to load specific resource JavaScript file on each XWiki page when using a jar extension without rendering macro?

I have a little jar extension, only consisting of a REST and a websocket endpoint,
plus a little JavaScript file “src/main/resources/js/whatever.js”.
How can I make sure that this “whatever.js” JavaScript file is loaded automatically on each webpage in my XWiki?
Thank you very much in advance.