added support for static javascript generation of mediated resources