JS window size change and removing id