diff --git a/content/bookmarks.js b/content/bookmarks.js index e7b01dea..d3832fa6 100644 --- a/content/bookmarks.js +++ b/content/bookmarks.js @@ -167,6 +167,18 @@ vimperator.Bookmarks = function () //{{{ this.add(title, url); vimperator.commandline.echo("Added bookmark: " + url + extra, vimperator.commandline.HL_NORMAL, vimperator.commandline.FORCE_SINGLELINE); } + + // update the display of our "bookmarked" symbol + vimperator.statusline.updateUrl(); + }, + + isBookmarked: function(url) + { + var uri = ioService.newURI(url, null, null); + var count = {}; + bookmarksService.getBookmarkIdsForURI(uri, count); + + return count.value > 0; }, // returns number of deleted bookmarks diff --git a/content/buffers.js b/content/buffers.js index 4a17bc36..951e2ba8 100644 --- a/content/buffers.js +++ b/content/buffers.js @@ -683,6 +683,10 @@ vimperator.Buffer = function () //{{{ if (countFeeds) info.push(countFeeds); + if (vimperator.bookmarks.isBookmarked(this.URL)) + info.push("bookmarked"); + + var pageInfoText = '"' + file + '" [' + info.join(", ") + "] " + title; vimperator.echo(pageInfoText, vimperator.commandline.FORCE_SINGLELINE); return; diff --git a/content/ui.js b/content/ui.js index 7ca37211..55617b66 100644 --- a/content/ui.js +++ b/content/ui.js @@ -1134,6 +1134,9 @@ vimperator.StatusLine = function () //{{{ modified += "+"; if (sh.index < sh.count -1) modified += "-"; + if (vimperator.bookmarks.isBookmarked(url)) + modified += "\u2764"; // a heart symbol: ❤ + //modified += "\u2665"; // a heart symbol: ♥ if (modified) url += " [" + modified + "]";