upload progress bar + clean code js