Fix js bug for firefox.

Actually it was my bad.. using some non-existent functions.
Merge remote-tracking branch 'origin/master'