I'm wanting to add some JavaScript to the bottom of every page, but I don't want to add it to the layout(s), so I'd like a way of doing it with a pipeline (or similar).
I've tried a few of the MVC pipelines, and within there I've used Sitecore.Context.ClientPage.ClientScript.RegisterClientScriptBlock(). The code runs with no errors, but the page never has the script added. Perhaps it's a timing thing with the order of the pipelines, I don't know.
Has anyone had any luck with doing this sort of thing before? How can it be done?