title: Can't access page data with Chrome Extension
body: <p>I know I must be missing something obvious but I've spent the past 2 hours trying to work this one out. What I'm trying to do is get some information from the active tab, specifically a variable from the URL and the content of a textarea.</p>
  
  <p>I can't seem to retrieve either of these from within my Chrome extension</p>
  
  <p>Here is my ticket.js</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>function getQueryVariable(variable)
  {
         var query = window.location.search.substring(1);
         var vars = query.split("&amp;");
         for (var i=0;i&lt;vars.length;i++) {
                 var pair = vars[i].split("=");
                 if(pair[0] == variable){return pair[1];}
         }
         return(false);
  }
  
  chrome.tabs.query({currentWindow: true, active: true}, function(tabs){
   console.log(tabs[0].url);
   var ticketID = getQueryVariable("id");
   console.log(ticketID);
   var inputTicket= document.getElementById('bottom_message').value;
   console.log(inputTicket);
  });</code></pre>
  </div>
  </div>
  </p>
  
  <p>Now when I run it nothing happens. My popup.js is blank and I currently don't need it to do anything popup related, however, do I need to reference ticket.js within popup.js?</p>
  
  <p>Here is my manifest</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>{
    "manifest_version": 2,
  
    "name": "Autosave",
    "description": "Extension Ticket system to autosave text in a ticket",
    "version": "1.0",
  
    "browser_action": {
      "default_icon": "icon.png",
    },
    "permissions": [
      "activeTab",
   "tabs"]
   
    "content_scripts": [
     "matches": ["https://portal.ticketsystem.co.uk/*"],
     "js": ["ticket.js"]
  }</code></pre>
  </div>
  </div>
  </p>