hacking to make javascript requestable by ajax