fix broken link handling
Merge pull request #4 from tleilax/master

Linkhandling in Javascript was broken