generate some JS to show stats