title: Chrome Extension - Not working in the newly opened tab
body: <p>I am developing a chrome extension, which is working great in all the scenario except in the new tab.</p>
  
  <p>i.e., the extension works only when a website is opened for eg. stackoverflow.com. When I do ctrl+t and click my extension icon, it doesn't works.</p>
  
  <p>I am doing something wrong? or Is it the browser behavior?</p>
  
  <p>I have added my code for you reference.</p>
  
  <p><strong>Manifest</strong></p>
  
  <pre><code>{
      "manifest_version": 2,
  
      "background": {
          "scripts": ["scripts/background.js"],
          "persistent": false
      },
  
      "content_scripts":[{
          "matches" : ["&lt;all_urls&gt;"],
          "js": ["scripts/jquery-2.1.0-min.js", "scripts/init.js"],
          "run_at": "document_end"
      }],
  
      "permissions": [
          "storage", "activeTab", "http://*/*", "https://*/*"
      ],
  
      "browser_action": {
          "default_icon": "images/plugin-icon-24.png"
      },
  
      "web_accessible_resources": [
          "*.html",
          "images/*.gif",
          "images/*.png"
      ]
  }
  </code></pre>
  
  <p><strong>init.js</strong></p>
  
  <pre><code>chrome.storage.sync.get('logged_in', function(status){
      if(status.logged_in){
          chrome.runtime.sendMessage('LOGGED_IN');
      } else {
          chrome.runtime.sendMessage('NOT_LOGGED_IN');
      }
  });
  </code></pre>
  
  <p><strong>background.js</strong></p>
  
  <pre><code>var add_resource = function(){
      chrome.tabs.executeScript({
          file: 'scripts/plugin.js'
      });
      chrome.tabs.insertCSS({
          file: 'styles/plugin.css'
      });
  };
  
  chrome.runtime.onMessage.addListener(function(message){ 
      alert(message);
      /*This alerts comes even in the newly opened tab. 
      But the script is not getting executed.*/
  
      if(message == 'LOGGED_IN'){
          add_resource();
      } else {
          chrome.browserAction.onClicked.addListener(function(tab){
              add_resource();
          });
      }
  });
  </code></pre>