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

new a and A mappings

This commit is contained in:
Martin Stubenschrott
2007-11-18 00:51:54 +00:00
parent eb51d93a79
commit b46255f7cd
4 changed files with 42 additions and 1 deletions

View File

@@ -148,6 +148,27 @@ vimperator.Bookmarks = function () //{{{
return true;
},
toggle: function(url)
{
if (!url)
return;
var count = this.remove(url);
if (count > 0)
{
vimperator.commandline.echo("Removed bookmark: " + url, vimperator.commandline.HL_NORMAL, vimperator.commandline.FORCE_SINGLELINE);
}
else
{
var title = vimperator.buffer.title || url;
var extra = "";
if (title != url)
extra = " (" + title + ")";
this.add(title, url);
vimperator.commandline.echo("Added bookmark: " + url + extra, vimperator.commandline.HL_NORMAL, vimperator.commandline.FORCE_SINGLELINE);
}
},
// returns number of deleted bookmarks
remove: function (url)
{