Updated JS

Source: https://gist.github.com/gwincr11/11149519