Update indexScript.js

generates the progress bar when the index is loaded