Update JS code
Merge pull request #7 from alex-pol/js

Update JS code