File tree Expand file tree Collapse file tree 1 file changed +2
-12
lines changed Expand file tree Collapse file tree 1 file changed +2
-12
lines changed Original file line number Diff line number Diff line change @@ -349,19 +349,9 @@ tabutils._phantomTabs = function() {
349
349
}
350
350
} , false ) ;
351
351
352
- gBrowser . selectUnpinnedTabAtIndex = function selectUnpinnedTabAtIndex ( aIndex , aEvent ) {
353
- var tabs = Array . filter ( this . allTabs , function ( aTab ) ! aTab . collapsed ) ;
354
- if ( aIndex < 0 )
355
- aIndex += tabs . length ;
352
+ TU_hookCode ( "gBrowser.selectTabAtIndex" , "this.visibleTabs" , "this.visibleTabs.filter(function(aTab) !aTab.collapsed)" ) ;
356
353
357
- if ( aIndex >= 0 && aIndex < tabs . length )
358
- this . selectedTab = tabs [ aIndex ] ;
359
-
360
- if ( aEvent ) {
361
- aEvent . preventDefault ( ) ;
362
- aEvent . stopPropagation ( ) ;
363
- }
364
- } ;
354
+ gBrowser . selectUnpinnedTabAtIndex = TU_hookFunc ( gBrowser . selectTabAtIndex , "visibleTabs" , "allTabs" ) ;
365
355
366
356
gBrowser . selectPinnedTabAtIndex = function selectPinnedTabAtIndex ( aIndex , aEvent ) {
367
357
var tabs = this . mTabContainer . mTabstrip . _pinnedbox . childNodes ;
You can’t perform that action at this time.
0 commit comments