Changeset 393

Show
Ignore:
Timestamp:
05/04/08 18:47:41 (2 weeks ago)
Author:
t-bone
Message:
  • Duplicate the tab clicked on, rather than the currently active tab.
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • extension/tabcontrol/content/tabcontrol.js

    r364 r393  
    3535    duplicateTabItem.setAttribute('label', bundle.getString('duplicateTab')); 
    3636    duplicateTabItem.setAttribute('accesskey', bundle.getString('duplicateTabAccessKey')); 
    37     duplicateTabItem.setAttribute('oncommand', 'gTabControl.duplicateTab(this);'); 
     37    duplicateTabItem.setAttribute('oncommand', 'gTabControl.duplicateTab();'); 
    3838 
    3939    var tabMenu=document 
     
    104104}, 
    105105 
    106 duplicateTab:function(aTab) { 
    107     if (aTab.localName!="tab") aTab=gBrowser.mCurrentTab; 
    108     var originalHistory=gBrowser.getBrowserForTab(aTab) 
     106duplicateTab:function() { 
     107    var tabbrowser=document.getElementById('content'); 
     108    var tab=tabbrowser.mContextTab; 
     109 
     110    var originalHistory=gBrowser.getBrowserForTab(tab) 
    109111        .webNavigation.sessionHistory; 
    110112