title: Google Chrome Extension - background script
body: <p>After messing around with Chrome Extension I noticed that when you are on the <code>chrome://extensions</code> page a background script initiated in the manifest file will run where as if you are just browsing the internet or on another other page besides the extension page the background script will not run.</p>
  
  <p>Here is what I mean:</p>
  
  <p>In my Manifest file:</p>
  
  
  
  <pre class="lang-js prettyprint-override"><code>"background": {
      "scripts": ["jquery-latest.js","background.js"]
    },
  </code></pre>
  
  <p>Now in the <code>background.js</code> file:</p>
  
  <pre class="lang-js prettyprint-override"><code>$(document).ready(function(){
      alert("working");
  });
  </code></pre>
  
  <p>I use a simple alert function to see if this will work and found out that <code>alert("working");</code> only gets displayed when I am on the <code>chrome://extension</code> directory.  If I go to google.com or something of that sort, no cigar.</p>
  
  <p>My question lies in, why does this happen? How do I change it so it does alert no matter what.</p>