title: How can I run this script when the tab reloads (chrome extension)?
body: <p>So i'd like to run a script when the tab reloads in a specified URL. It almost works, but actually id doesn't :)
  This is my manifest file:</p>
  
  <pre><code>{
  "manifest_version": 2,
  
  "name": "Sample Extension",
  "description": "Sample Chrome Extension",
  "version": "1.0",
  
  "content_scripts":
  [
      {
        "matches": ["http://translate.google.hu/*"],
        "js": ["run.js"]
      }
  ],
  
  "permissions":
  [
      "activeTab",
      "tabs"
  ],
  
  "browser_action":
  {
      "default_title": "Sample",
      "default_icon": "icon.png"
  }
  }
  </code></pre>
  
  <p>and this is run.js:</p>
  
  <pre><code>chrome.tabs.onUpdated.addListener(
  function ( tabId, changeInfo, tab )
  {
      if ( changeInfo.status === "complete" )
      {
          chrome.tabs.executeScript( null, {file: "program.js"} );
      }
  }
  );
  </code></pre>
  
  <p>The programs.js just alerts some text (yet). When I put an alert to the first line of the run.js, it alerts, but when I put it in the if, it doesn't. I can't find the problem. Did I type something wrong?</p>