title: Chrome extension: load and execute external script
body: <p>I have trouble loading and executing external js-script into my chrome extension. Looks the same as <a href="https://stackoverflow.com/questions/7781851/loading-external-javascript-in-google-chrome-extension">this question</a>, but I still cant't figure out why it doesn't work in my case.</p>
  
  <p>The idea is that I want to have in my content script some default function which should parse a web-page content. And for some specific web-pages I want to load and use specific parsers, so I try to load proper js-script for a wep-page, and this script shoud extend functionality of default parser.</p>
  
  <p>By now I try only execute code from external script, but have such error: <code>Unchecked runtime.lastError while running tabs.executeScript: No source code or file specified at Object.callback</code></p>
  
  <p>This is my <strong>manifest.json</strong>:</p>
  
  <pre><code>{
  "name": "Extension name",
  "version": "1.2",
  "description": "My chrome extension",
  "browser_action": {
      "default_popup": "popup.html",
  },
  "content_scripts": [{
      "css": [
          "style.css"
      ],
      "js": [
          "bower_components/jquery/dist/jquery.js",
          "bower_components/bootstrap/dist/js/bootstrap.js",
          "content.js"
      ],
      "matches": ["*://*/*"]
  }],
  "web_accessible_resources": [
      "frame.html",
      "logo-48.png"
  ],
  "icons": {
      "16": "logo-16.png",
      "48": "logo-48.png",
      "128": "logo-128.png"
  },
  "permissions": [
      "tabs",
      "storage",
      "http://*/",
      "https://*/"
  ],
  "manifest_version": 2
  </code></pre>
  
  <p>}</p>
  
  <p>This is <strong>popup.html</strong></p>
  
  <pre><code>&lt;!doctype html&gt;
   &lt;html&gt;
   &lt;head&gt;
    &lt;title&gt;Title&lt;/title&gt;
    &lt;script src="popup.js"&gt;&lt;/script&gt;
   &lt;/head&gt;
   &lt;body&gt;
    &lt;ul&gt;
      &lt;li&gt;Some link&lt;/li&gt;
    &lt;/ul&gt;
   &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>And in <strong>popup.js</strong> i execute scrip like this:</p>
  
  <pre><code>chrome.tabs.query({active: true, currentWindow: true}, function(tabs) {
      chrome.tabs.executeScript(tabs[0].id, {file: "http://127.0.0.1:8000/static/plugin/somesite.js"});
  });
  </code></pre>
  
  <p>What am I dong wrong, did I miss something? Or should I use another approach to solve the issue?</p>