diff --git a/scripts.js b/scripts.js index 285854e..d27ea06 100644 --- a/scripts.js +++ b/scripts.js @@ -11,6 +11,10 @@ window.addEventListener('DOMContentLoaded', function() { var isMobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent); + function focusInput() { + inputField.focus() + } + function updateFragment(text) { // Don't spam the browser history & strip query strings. window.location.replace(location.origin + '/#' + encodeURIComponent(text)); @@ -158,6 +162,8 @@ window.addEventListener('DOMContentLoaded', function() { updateFragment(WELCOME_MSG); } + + focusInput(); renderText(); initAnalytics(); });