Port missing parts from 2c51bc0ca5 to glitch-soc
2c51bc0ca5
It should not be necessary thanks to our Content Security Policy, but best be sure in case a server's CSP is incorrect. Also, avoids a CSP warning about loading remote scripts.