Change trace output to javascript