title: Chrome extension find tabs
body: <p>I am creating a chrome extension which should open a new tab when clicked, which would take you to google.</p>
  
  <p>Currently I have this</p>
  
  <pre><code>chrome.tabs.create({
      "url": "http://google.co.uk",
      "index":0,
      "pinned":true
  });
  </code></pre>
  
  <p>how can I search the tabs too see if that tab is open and if it is pinned.If it is opened and pinned the prgram should do nothing, if open but not pinned it should pin that tab, and if not opened or pinned it should open the tab and pin it.</p>
  
  <p>Can I use </p>
  
  <pre><code>chrome.tabs.query()
  </code></pre>
  
  <p>or do I need something else?</p>