Fix bug 1055078 - Update JS files to pass JSHint