MDL-44486 core: Rewrite JavaScript progressbar