title: Get Browser Tab Index/Id
body: <p>So in most current browsers there is the feature of Tabs, is there a way to get the Tab index?</p>
  
  <p>so Tab 1 has www.google.com opened in it and Tab 2 has www.google.com opened in it, is there a way to identify what the Tab index is?</p>
  
  <p>Pseudo Code:</p>
  
  <pre><code>if($tab == 2) {
    alert "Tab 2 is active\n";
  }
  
  if($tab == 1) {
    alert "Please use Tab 2 as this is Tab 1\n";
  }
  </code></pre>
  
  <p>Funny as everything I search for about tabs is related to the tab index of the webpage itself, sigh...</p>