title: How to select the Google search bar using Javascript
body: <p>I'm using the Chrome extension "Shortkeys" to write shortcut-executable Javascript code that selects the Google search bar while browsing Google searches. Important: I'm not trying to select Chrome's address bar, but the actual search bar on Google's website. I found the search bar element using "inspect element" and found it was inside a div with class "a4bIc". The first tag of the search bar element is "input". So my code is this:</p>
  
  <pre><code>var x = document.querySelectorAll("div.a4bIc input")[document.selectedResultId]
  </code></pre>
  
  <p>Except it doesn't select the search bar. What am I missing?</p>