1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-04-03 07:43:32 +02:00

"A" adds the bookmark in the unfiled bookmarks folder now

This commit is contained in:
Martin Stubenschrott
2007-12-03 22:12:25 +00:00
parent b3399cccf2
commit 5090c560ab
3 changed files with 11 additions and 5 deletions

View File

@@ -110,7 +110,8 @@ vimperator.Bookmarks = function () //{{{
return vimperator.completion.filterURLArray(bookmarks, filter, tags);
},
add: function (title, url, keyword, tags)
// if starOnly = true it is saved in the unfiledBookmarksFolder, otherwise in the bookmarksMenuFolder
add: function (starOnly, title, url, keyword, tags)
{
if (!bookmarks)
load();
@@ -122,7 +123,10 @@ vimperator.Bookmarks = function () //{{{
try
{
var uri = ioService.newURI(url, null, null);
var id = bookmarksService.insertBookmark(bookmarksService.placesRoot, uri, -1, title);
var id = bookmarksService.insertBookmark(
starOnly ? bookmarksService.unfiledBookmarksFolder : bookmarksService.bookmarksMenuFolder,
uri, -1, title);
if (!id)
return false;
@@ -165,7 +169,7 @@ vimperator.Bookmarks = function () //{{{
var extra = "";
if (title != url)
extra = " (" + title + ")";
this.add(title, url);
this.add(true, title, url);
vimperator.commandline.echo("Added bookmark: " + url + extra, vimperator.commandline.HL_NORMAL, vimperator.commandline.FORCE_SINGLELINE);
}
},