title: Get currently active input field. Chrome content script. Script injection
body: <h2>What I want to do:</h2>
  
  <p>How can I get the value of the input field the user is currently typing into? 
  I am injecting JavaScript via a Chrome Content Script into the visited website.</p>
  
  <h2>What i have already tried:</h2>
  
  <p>I was trying <code>alert($('.lastSelected').attr('id'));</code> and <code>alert('document.activeElement.value: ' + document.activeElement.value);</code> with no success. Both approaches deliver <code>undefined</code>.</p>