jshint: change navigator to window.navigator