make the javascript hookable