A javascript script generator