added debounce on resizing
event registration changed to addEventListener
Merge pull request #1 from Dani723/master

resize handler