Adding a UI script allows for adding any sort of JavaScript, and it can be made global. In the left admin serach box, just type in "UI Script" and then go from there to add a new one, or search existing ones.
this worked for instance
var script = document.createElement('script'); script.src = "https://www.example.com/example.min.js"; document.head.appendChild(script) /*var script2 = document.createElement('script'); script2.src = "https://www.example.com/xapis/Pretranslate/xxxx-xxxx-xxxx-xxxx.js"; document.head.appendChild(script2)*/