Skip to content
This repository has been archived by the owner on Mar 5, 2019. It is now read-only.

Fix for "open new tabs next to current" #128

Open
wants to merge 1 commit into
base: Fixed
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions chrome/content/tabutils.js
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,7 @@ tabutils._tabOpeningOptions = function() {
[/\S*insertRelatedAfterCurrent\S*(?=\))/, "false"], // replace "getBoolPref("browser.tabs.insertRelatedAfterCurrent")"
[/(?=(return t;)(?![\s\S]*\1))/, function() {
if (t.hasAttribute("opener")) {
function shouldStack(tab) { let args = tab.arguments; return args.aReferrerURI || args.aRelatedToCurrent && args.aURI != "about:blank"; }
function shouldStack(tab) { return true; }

let lastRelatedTab = this.mCurrentTab;
let isStack = this.isStackedTab(lastRelatedTab);
Expand All @@ -697,7 +697,7 @@ tabutils._tabOpeningOptions = function() {
if ((function() {
switch (TU_getPref("extensions.tabutils.openTabNext", 1)) {
case 1: //All
case 2: return aRelatedToCurrent || aReferrerURI || (aURI != "about:blank" && aURI != "about:newtab"); //All but New Tab
case 2: return aRelatedToCurrent || aReferrerURI || !isBlankPageURL(aURI); //All but New Tab
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again (lost from Github's review process): Good catch! It utilizes the gInitialPages in isBlankPageURL function.

case 3: return aRelatedToCurrent == null ? aReferrerURI : aRelatedToCurrent; //None but Links
default: return false; //None
}
Expand Down