title: get all cookies related to current tab
body: <p>I have been trying various things now but cannot get it to work. I want <strong>all</strong> cookies related to the current tab (ie also those on a different domain eg google). The below only gives me those matching the tab domain. Setting getAll({}) gives me all cookies related to any page visited.</p>
  
  <pre><code>document.addEventListener('DOMContentLoaded', function () {
    var cookies2=[];
    chrome.tabs.query({currentWindow:true,active:true},function(tab) {
        console.log(tab[0]);
        chrome.cookies.getAll({url:tab[0].url},function(cookies) {
          for (var i in cookies) {
              console.log(cookies[i].domain,cookies[i].path,cookies[i].name);
          }
        });
      });
  
  });
  </code></pre>