Added function to get progress, changed javascript code.