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

Add ;F back again. Kris is right, that we are in feature freeze, but

this really just is a small commit which looks done right and satisfies
the need of a lot of people.

This reverts commit 969feba9355bdc148dc9403992facb314a30d1be.
This commit is contained in:
Martin Stubenschrott
2009-01-03 14:10:34 +01:00
parent 14b566422b
commit 5a139df797
2 changed files with 17 additions and 0 deletions

View File

@@ -73,6 +73,7 @@ function Hints() //{{{
t: Mode("Follow hint in a new tab", function (elem) buffer.followLink(elem, liberator.NEW_TAB)),
b: Mode("Follow hint in a background tab", function (elem) buffer.followLink(elem, liberator.NEW_BACKGROUND_TAB)),
w: Mode("Follow hint in a new window", function (elem) buffer.followLink(elem, liberator.NEW_WINDOW), extended),
F: Mode("Follow hint sequence in tabs", hintSequenceElement),
O: Mode("Preselect hint in an :open query", function (elem, loc) commandline.open(":", "open " + loc, modes.EX)),
T: Mode("Preselect hint in a :tabopen query", function (elem, loc) commandline.open(":", "tabopen " + loc, modes.EX)),
W: Mode("Preselect hint in a :winopen query", function (elem, loc) commandline.open(":", "winopen " + loc, modes.EX)),
@@ -82,6 +83,21 @@ function Hints() //{{{
Y: Mode("Yank hint description", function (elem) util.copyToClipboard(elem.textContent || "", true), extended)
};
// Implement ';F' hint sequences. This function handles on element of the hint sequence.
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
hints.show("F");
}
// reset all important variables
function reset()
{

View File

@@ -48,6 +48,7 @@ this hint mode. Then press [a]24[a] to copy the hint location.
* |;t| [m]t[m] to open its location in a new tab
* |;b| [m]b[m] to open its location in a new background tab
* |;w| [m]w[m] to open its destination in a new window
* |;F| [m]F[m] to follow a sequence of [m]<CR>[m]-delimited hints in background tabs
* |;O| [m]O[m] to preselect its location in an [c]:open[c] query
* |;T| [m]T[m] to preselect its location in a [c]:tabopen[c] query
* |;W| [m]W[m] to preselect its location in a [c]:winopen[c] query