adds comments to javascript animation