Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Respect insertRelatedAfterCurrent in GM_openInTab().

Fixes #1370.
  • Loading branch information...
commit 9eec712ed39edc248ef3fe6e7b554fe56e9790dd 1 parent 6339b68
@arantius arantius authored
Showing with 7 additions and 1 deletion.
  1. +7 −1 components/greasemonkey.js
View
8 components/greasemonkey.js
@@ -281,7 +281,13 @@ service.prototype._openInTab = function(
var newTab = browser.loadOneTab(url, {'inBackground': aLoadInBackground});
var newWin = GM_windowForTab(newTab, browser);
- browser.moveTabTo(newTab, currentTab._tPos + 1);
+ var afterCurrent = Cc["@mozilla.org/preferences-service;1"]
+ .getService(Ci.nsIPrefService)
+ .getBranch("browser.tabs.")
+ .getBoolPref("insertRelatedAfterCurrent");
+ if (afterCurrent) {
+ browser.moveTabTo(newTab, currentTab._tPos + 1);
+ }
return newWin;
};
Please sign in to comment.
Something went wrong with that request. Please try again.