title: Bypassing the "no popup" if I want a javascript to run when extension clicked
body: <p>I have a chrome extension which I want to fire whenever I press the popup. Currently I can do this only if I remove the popup.html from manifest.json, since there's a restriction on that. However, I need the popup.html</p>
  
  <p>How do I get both?</p>
  
  <p>I have tried placing the exact same thing everywhere, in the popup.html, in the popup.js (which is linked correctly in the popup.html) and nothing.</p>
  
  <p>In short, if I place this in the background.js:</p>
  
  <pre><code>chrome.browserAction.onClicked.addListener(function(info, tab) {
      speakMe();
      });
  </code></pre>
  
  <p>It works.</p>
  
  <p>However, that implies no popup.html in the manifest. So, naturally, I try placing this:</p>
  
  <pre><code>    &lt;script&gt;
      chrome.browserAction.onClicked.addListener(function(info, tab) {
    speakMe();
  });
      &lt;/script&gt;
  </code></pre>
  
  <p>in the popup.html. It doesn't work. Pressing the icon displays the popup normally, but nothing happens.</p>
  
  <p>I tried placing it in the popup.js too, still nothing. What am I doing wrong?</p>