title: Opening a new tab on Google Chrome Extension
body: <p>This is my background.html file, It works fine when opening in current tab but I want it to open in new tab, what am I doing wrong?</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;script&gt;
    // Called when the user clicks on the browser action.
    chrome.browserAction.onClicked.addListener(function(tab) {
      var action_url = "javascript:location.href='http://www.reddit.com/submit?url='+encodeURIComponent(location.href)+'&amp;title='+encodeURIComponent(document.title)";
      chrome.tabs.create(tab.id, {url: action_url}, function(tab));
    });
  &lt;/script&gt;
  &lt;/head&gt;
  &lt;/html&gt;
  </code></pre>