title: In a Chrome extension, how do I get the URL of the website with browser_action (popup.html)?
body: <p>I am creating a Chrome extension, with the following code.</p>
  <h3>File <em>manifest.json</em></h3>
  <pre><code>{
  &quot;name&quot;: &quot;Project&quot;,
  &quot;version&quot;: &quot;1.0.0&quot;,
  &quot;manifest_version&quot;: 2,
  &quot;description&quot;: &quot;Popup when website requires Log in&quot;,
  &quot;browser_action&quot;:{
      &quot;default_icon&quot;:&quot;icon_19.png&quot;,
      &quot;default_popup&quot;:&quot;Popup.html&quot;
   }
  }
  </code></pre>
  <h3>File <em>Popup.html</em></h3>
  <pre><code>&lt;html&gt;
  &lt;head&gt;&lt;/head&gt;
  &lt;body&gt;
  &lt;div class=&quot;plus&quot; id=&quot;plu&quot;&gt;&lt;/div&gt;
  &lt;script src=&quot;inline.js&quot;&gt;&lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  <p>inline.js:</p>
  <pre><code>window.onload = function() {
      document.getElementById('plu').onclick=popup;
  }
  function popup() {
      var link = document.URL;
      alert(&quot;This is the link: ( &quot; +link+ &quot; )&quot;);
  }
  </code></pre>
  <p>When I click the div with the ID 'plu', it gets the URL of file <em>popup.html</em>, but not for the website.</p>