Adding in javascript for saving the canvas