title: Closing a tab without closing the window
body: <p>Hi I have set up a task in my task scheduler to login to my UTM by opening a firefox window at regular intervals. When the relevant URL is loaded a auto-login GM script works on it and logs me in to UTM. </p>
  
  <p>I would like to close that tab after the login is done. If I use</p>
  
  <p>window.close();</p>
  
  <p>It works fine but if no other tab is opened at the time, it simply closes the window. </p>
  
  <p>Without going into details of UTM I would like the following -</p>
  
  <p>A GM hack which closes the tab only if other tabs are already open. If it is the last tab of the window, then it should just replace it with a blank tab (so that window is not closed).</p>
  
  <p>Probably GM cannot obtain any info about the other tabs, but is there any hack ?</p>