js init function updated
Merge pull request #5112 from unclediluvian/mybranch

js init function updated