1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-20 16:17:59 +01:00

Fixed browser.followLink so that NEW_TAB semantics are invariant of prefs.

This commit is contained in:
Ted Pavlic
2009-01-08 12:01:31 -05:00
parent 3a98dfc589
commit bfe47dff89
3 changed files with 9 additions and 14 deletions

View File

@@ -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;

View File

@@ -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);
// 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",

View File

@@ -22,8 +22,10 @@ ________________________________________________________________________________
|F| +
||#F#{hint}||
________________________________________________________________________________
Start QuickHint mode, but open link in a new tab. Like normal QuickHint mode
(activated with [m]f[m]) but opens the link in a new tab.
Start QuickHint mode, but open link in a new tab. Like normal QuickHint
mode (activated with [m]f[m]) but opens the link in a new tab. The new
tab will be loaded in background according to the
\'browser.tabs.loadInBackground' Firefox preference.
________________________________________________________________________________
@@ -59,9 +61,6 @@ this hint mode. Then press [a]24[a] to copy the hint location.
Hintable elements for all extended hint modes can be set in the
'extendedhinttags' XPath string.
Note: The behavior of [m];t[m] and [m];b[m] is inverted if the
\'browser.tabs.loadInBackground' Firefox preference is set to false.
________________________________________________________________________________
// vim: set syntax=asciidoc: