Do it in javascript
Merge pull request #1 from kindkid/master

Do it in javascript