extension ExtPose

LASTab

Description from extension meta

Fixes selected tab after close occurs, returning you to your previous tab instead of the random one next to the one you closed.

Image from store LASTab
Description from store Automatically selects the previously selected tab if you switch to a tab, and then close it. No longer will you be left at some random consecutive tab. Also works if you detach a tab from the current window you will return to your previous tab instead of next to the one you removed, Especially useful when you have so many tabs that you must view them before close, and you happen to guess right about which one to close, only to get lost in a sea of unlabeled tabs, forced to find which one you were just on.... well... not anymore.... If you need to manage more than just one previous tab try my other extension LasTabZ linked below.

Latest reviews

  • (2019-03-15) Or Schiro: Works as expected! 👍🙂
  • (2017-03-24) Tim Silvers: I was very happy to find this extension. As a feature request, I would like for it to be faster. I see the tab just to the left for a nanosecond before the extension takes control and sends me to the previous tab.
  • (2016-01-21) 유태종: It would be nice if this extension remembered complete history of tabs opened but not just last one. Edit: thank you for making everyone's life better dev!
  • (2014-07-19) Wesley G: Perfect! It makes no sense to throw me on some random next tab just because I close one I am on. With this extension I am sent to the one I was previously on. It makes perfect sense and I love it.

Latest issues

  • (2018-11-28, v:0.0.1.4) Joel Waxman: Errors and doesn't work
    Lastab is throwing errors and doesn't work. Below are the errors. Error in event handler: TypeError: Cannot read property '0' of undefined Context _generated_background_page.html Stack Trace background.js:25 (removedTab) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 var selWindows=[]; function historyAdd(windowId,tabId){ if( !selWindows[windowId] ){ selWindows[windowId] = new Array(2); selWindows[windowId][0]=0; selWindows[windowId][1]=0; } if(selWindows[windowId][0]==tabId)return; selWindows[windowId][2]=selWindows[windowId][1]; selWindows[windowId][1]=selWindows[windowId][0]; selWindows[windowId][0]=tabId; } var currentWindow = 1;//to track which set of tabs to return to the popup.html function setCurrentWindow(tabId,selectInfo){ currentWindow=selectInfo.windowId; historyAdd(selectInfo.windowId,tabId); } chrome.tabs.onSelectionChanged.addListener(setCurrentWindow); chrome.windows.onFocusChanged.addListener(function(windowId){ chrome.tabs.getSelected(windowId,function(tab){ setCurrentWindow(tab.id,{windowId:tab.windowId}) }) }); function removedTab(tabId) { if( tabId == selWindows[currentWindow][0] ){ setTimeout(function(){//unnecessary timeout? chrome.windows.getCurrent(function(window) { if( currentWindow==window.id ){ if(selWindows[window.id][1]==tabId){ chrome.tabs.update(selWindows[window.id][2],{selected:true},function(){ }) } } }) },3); } } chrome.tabs.onRemoved.addListener(removedTab); chrome.tabs.onDetached.addListener(removedTab); function cleanupEmptyWindows(){ var nsw = new Array(); for(i in selWindows){ if( typeof(selWindows[i]) == 'object' && selWindows[i]!=null && selWindows[i].length > 0){ nsw[i]=selWindows[i]; } } selWindows=nsw; } chrome.windows.onRemoved.addListener(function(winId) { if( selWindows[winId] ){ selWindows[winId]=null; cleanupEmptyWindows() } }); Error handling response: TypeError: Cannot read property 'id' of undefined Unchecked runtime.lastError: No window with id: -1.
  • (2016-10-11, v:0.0.1.4) 유태종: New tab placement
    Open new tab right next to currently focused tab instead of last position.
  • (2012-09-04, v:0.0.1.3) Peter Collins: Unable to install
    Manifest file is invalid. Unable to install app

Statistics

Installs
226 history
Category
Rating
4.8 (16 votes)
Last update / version
2013-06-22 / 0.0.1.4
Listing languages
en

Links