Vanilla JS progressbar implementation