The thing with the module I am making is that it kind of generates a javascript snippet, so I cannot use an action to just hook that into the section of the HTML since the
The stock head template is
template/page/html/head.phtml
Copying that file in your own theme would be the simplest way to get some javascript in the head.
Better though (from a developer point of view), this template includes the following line
getChildHtml() ?>
The about link prints out all the child blocks of a block. So, adding a child block to the head block would also work.
alert("foo");
//]]>
The above XML uses a simple core/text block to add javascript to every Magento page. Works from local.xml, should work elsewhere. I'm sure better ways to do this should spring to mind (template block, for example)