Issue 1157: Unused javascript function is removed.
Merge pull request #1165 from annando/1409-issue-1157

Issue 1157: Unused javascript function is removed.