title: Access DOM elements through chrome extension
body: <p>I'm trying to access some DOM elements from a webpage:</p>
  
  <pre><code>&lt;html&gt;
    &lt;button id="mybutton"&gt;click me&lt;/button&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>I want to access the innerHTML ("click me") through a chrome extension:</p>
  
  <pre><code>chrome.browserAction.onClicked.addListener(function(tab) {
      var button = document.getElementById("mybutton");
      if(button == null){
          alert("null!");
      }
      else{
          alert("found!");
      }
  });
  </code></pre>
  
  <p>When I click the extension, the popup says: "null".
  My manifest.json:</p>
  
  <pre><code>{
      "name": "HackExtension",
      "description": "Hack all the things",
      "version": "2.0",
      "permissions": [
      "tabs", "http://*/*"
      ],
      "background": {
      "scripts": ["contentscript.js"],
      "persistent": false
      },
      "browser_action": {
      "scripts": ["contentscript.js"],
      "persistent": false
      },
      "manifest_version": 2
  }
  </code></pre>