From f560f7e0466bc6b8a86cb862e2990597ffa09f67 Mon Sep 17 00:00:00 2001 From: Viktor Kojouharov Date: Sun, 13 May 2007 21:36:54 +0000 Subject: [PATCH] The Return of the Link --- chrome/content/vimperator/settings.js | 15 +++++++++++++++ chrome/content/vimperator/vimperator.js | 13 +++++++++++-- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/chrome/content/vimperator/settings.js b/chrome/content/vimperator/settings.js index 5b58f3be..5ec4f60c 100644 --- a/chrome/content/vimperator/settings.js +++ b/chrome/content/vimperator/settings.js @@ -230,6 +230,21 @@ var g_settings = [/*{{{*/ true, null ], + [ + ["showstatuslinks", "ssli"], + ["showstatuslinks", "ssli"], + "Show the destination of the link under the cursor in the status bar", + "Available items:
"+ + "", + "number", + null, + function(value) { set_pref("showstatuslinks", value); }, + function() { return get_pref("showstatuslinks"); }, + 1, + null + ], [ ["showtabline", "stal"], ["showtabline", "stal"], diff --git a/chrome/content/vimperator/vimperator.js b/chrome/content/vimperator/vimperator.js index dad747d4..f4fc0952 100644 --- a/chrome/content/vimperator/vimperator.js +++ b/chrome/content/vimperator/vimperator.js @@ -105,11 +105,20 @@ nsBrowserStatusHandler.prototype = setOverLink : function(link, b) { - //updateStatusbar(link); - //vimperator.echo(link); + var ssli = get_pref("showstatuslinks"); + if (link && ssli) + { + if (ssli == 1) + updateStatusbar("Link: " + link); + else if (ssli == 2) + vimperator.echo("Link: " + link); + } if (link == "") + { + updateStatusbar(); showMode(); + } }, setJSStatus : function(status)