Skip to content

Instantly share code, notes, and snippets.

@958
Created April 28, 2011 05:12
Show Gist options
  • Save 958/945841 to your computer and use it in GitHub Desktop.
Save 958/945841 to your computer and use it in GitHub Desktop.
[keysnail] vimperator の C-^ みたいな
if (typeof gBrowser !== 'undefined') {
let previousSelectedTabIndex = gBrowser.tabContainer.selectedIndex;
let currentSelectedTabIndex = previousSelectedTabIndex;
gBrowser.tabContainer.addEventListener("TabSelect", function(){
previousSelectedTabIndex = currentSelectedTabIndex;
currentSelectedTabIndex = gBrowser.tabContainer.selectedIndex;
}, false);
key.setGlobalKey('C-^', function (ev, arg) {
gBrowser.tabContainer.selectedIndex = previousSelectedTabIndex;
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment