turn voting client script into js file