mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-02-14 06:45:51 +01:00
Fixed browser.followLink so that NEW_TAB semantics are invariant of prefs.
This commit is contained in:
@@ -1123,8 +1123,10 @@ function Buffer() //{{{
|
||||
{
|
||||
case liberator.NEW_TAB:
|
||||
case liberator.NEW_BACKGROUND_TAB:
|
||||
let invertLogic = !options.getPref("browser.tabs.loadInBackground");
|
||||
let backgroundDesired = (where == liberator.NEW_BACKGROUND_TAB);
|
||||
ctrlKey = true;
|
||||
shiftKey = (where != liberator.NEW_BACKGROUND_TAB);
|
||||
shiftKey = invertLogic ? backgroundDesired : !backgroundDesired;
|
||||
break;
|
||||
case liberator.NEW_WINDOW:
|
||||
shiftKey = true;
|
||||
|
||||
@@ -86,13 +86,7 @@ function Hints() //{{{
|
||||
// Used to open multiple hints
|
||||
function hintSequenceElement(elem)
|
||||
{
|
||||
// Want to always open sequence hints in background
|
||||
// (remember: NEW_BACKGROUND_TAB and NEW_TAB semantics assume
|
||||
// that loadInBackground=true)
|
||||
if (options.getPref("browser.tabs.loadInBackground"))
|
||||
buffer.followLink(elem, liberator.NEW_BACKGROUND_TAB);
|
||||
else
|
||||
buffer.followLink(elem, liberator.NEW_TAB);
|
||||
buffer.followLink(elem, liberator.NEW_BACKGROUND_TAB);
|
||||
|
||||
// Move to next element in sequence
|
||||
// TODO: Maybe we find a *simple* way to keep the hints displayed rather than
|
||||
@@ -601,7 +595,7 @@ function Hints() //{{{
|
||||
|
||||
mappings.add(myModes, ["F"],
|
||||
"Start QuickHint mode, but open link in a new tab",
|
||||
function () { hints.show("t"); });
|
||||
function () { options.getPref("browser.tabs.loadInBackground") ? hints.show("b") : hints.show("t"); });
|
||||
|
||||
mappings.add(myModes, [";"],
|
||||
"Start an extended hint mode",
|
||||
|
||||
Reference in New Issue
Block a user