How to inject content into `before-script-load`?

That is a development page that isn’t used in production.

As for the actual pages in Discourse, themes can inject content in the head element just fine, but without much control of the exact place where it happens, but as @Lilly said this shouldnt be an issue.

If you can tell us mor details about what exactly what you want to accomplish we may offer some suggestions.