mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-28 23:12:26 +01:00
new 'followhints' option, thanks Ruud
This commit is contained in:
@@ -686,7 +686,7 @@ function History() //{{{
|
||||
function (args, special) { history.list(args.string, special); },
|
||||
{
|
||||
bang: true,
|
||||
completer: function (filter) completion.history(filter)
|
||||
// completer: function (filter) completion.history(filter)
|
||||
});
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////}}}
|
||||
|
||||
@@ -1035,8 +1035,6 @@ function Completion() //{{{
|
||||
|
||||
highlightGroup: function highlightGroup(filter) commands.get("highlight").completer(filter), // XXX
|
||||
|
||||
history: function _history(filter) [0, history.get(filter)],
|
||||
|
||||
get javascriptCompleter() javascript,
|
||||
|
||||
javascript: function _javascript(str)
|
||||
|
||||
@@ -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