modifying javascript to alleviate render-blocking