A JavaScript loading util for handling script-loading based on screen size