Script to detect resize and fire reload