Formatted scrollgress function in init.js