Fix issue #3 (closed)
It should work, but I didn't test it in real condition. Can you see if it's ok? I don't have the setup to test it quickly and easily (I'm not a JS developer).
This will create a new commit in order to revert the existing changes.