Return from function if hash is set or addEventListener isn't present

I have turned the if-condition in line 6 around. To me this reflects the actual behavior better and matches the comment above.

I like this way to return from functions if you want to stop them better than having a lot of lines in a condition. Maybe it's not what you think works best. Anyway this is just a try to make the statement more clear :)

__Edit:__ There is also a new line at end of file. I hope this doesn't matter too much. Can update PR if needed.