1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-11 15:45:46 +01:00

new 'followhints' option, thanks Ruud

This commit is contained in:
Martin Stubenschrott
2008-11-20 20:36:25 +00:00
parent cd2c0d6c6d
commit ebdac3be1f
6 changed files with 34 additions and 3 deletions

View File

@@ -323,6 +323,17 @@ function Hints() //{{{
return false;
}
if (options["followhints"] > 0)
{
if (!followFirst)
return false; // no return hit; don't examine uniqueness
// OK. return hit. But there's more than one hint. And
// there's no tab-selected current link. Do not follow in mode 2
if ((options["followhints"] == 2) && validHints.length > 1 && !hintNumber)
return liberator.beep();
}
if (!followFirst)
{
var firstHref = validHints[0].getAttribute("href") || null;
@@ -544,6 +555,11 @@ function Hints() //{{{
"number", 0,
{ validator: function (value) value >= 0 });
options.add(["followhints", "fh"],
"Change the way when to automatically follow hints",
"number", 0,
{ validator: function (value) value >= 0 && value < 3 });
options.add(["linkfgcolor", "lfc"],
"Foreground color of a link during hint mode",
"string", "black");