Skip to content

Commit

Permalink
Correctly duplicate tab in SeaMonkey
Browse files Browse the repository at this point in the history
  • Loading branch information
Infocatcher committed Jan 15, 2017
1 parent 6f975c0 commit b0ca202
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -1491,7 +1491,9 @@ var privateTab = {
var pos = "_tPos" in tab
? tab._tPos
: Array.prototype.indexOf.call(gBrowser.tabs, tab); // SeaMonkey
var newTab = gBrowser.duplicateTab(tab);
var newTab = "duplicateTab" in gBrowser
? gBrowser.duplicateTab(tab)
: this.ss.duplicateTab(window, tab); // SeaMonkey
gBrowser.moveTabTo(newTab, pos);
}
else if(
Expand Down Expand Up @@ -3742,7 +3744,9 @@ var privateTab = {
tab.removeAttribute(this.privateAttr);
if(this.isRemoteTab(tab)) // D'oh, let's try
this.readyToOpenTab(window, isPrivate);
var dupTab = gBrowser.duplicateTab(tab);
var dupTab = "duplicateTab" in gBrowser
? gBrowser.duplicateTab(tab)
: this.ss.duplicateTab(window, tab); // SeaMonkey
// And then restore original state
if(origIsPrivate)
tab.setAttribute(this.privateAttr, "true");
Expand Down

0 comments on commit b0ca202

Please sign in to comment.