that's an interesting post, but it solves a whole different issue.
I am disappointed about the lack of DelegateControl customization support in Sandboxed solutions, because I expected that I could distribute my recently published CodePlex project (
http://devdashvis.codeplex.com/) as a Sandboxed solution. It consists of only a set of .js files that should be referenced on every page in the site collection. Unfortunately, I was forced to wrap it in a Farm solution.
I think there will be many more js-only solutions in the future, in particular because of the Client OM and REST, and they will all be affected by this limitation.
An alternative approach, which is very innovative, but isn't very clean IMO, is to do something like what Jan Tielens is doing with his jQueryLoader. He created an installer aspx page with inline javascript, which needs to be deployed into the site collection. This page uses the web services to get the contents of the master page, manipulates it with javascript string processing, and then saves it back using the web services. As I said, it works, but I would really prefer a more unobstrusive method.