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:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user