// Copyright (c) 2006-2008 by Martin Stubenschrott <stubenschrott@vimperator.org>
// Copyright (c) 2007-2011 by Doug Kearns <dougkearns@gmail.com>
-// Copyright (c) 2008-2011 by Kris Maglione <maglione.k@gmail.com>
+// Copyright (c) 2008-2012 Kris Maglione <maglione.k@gmail.com>
//
// This work is licensed for reuse under an MIT license. Details are
// given in the LICENSE.txt file included with this file.
-/* use strict */
+"use strict";
// also includes methods for dealing with keywords and search engines
var Bookmarks = Module("bookmarks", {
checkBookmarked: function checkBookmarked(uri) {
if (PlacesUtils.asyncGetBookmarkIds)
- PlacesUtils.asyncGetBookmarkIds(uri, function (ids) {
+ PlacesUtils.asyncGetBookmarkIds(uri, function withBookmarkIDs(ids) {
statusline.bookmarked = ids.length;
});
else
}
}, {
}, {
- commands: function () {
+ commands: function initCommands() {
// TODO: Clean this up.
const tags = {
names: ["-tags", "-T"],
privateData: true
});
},
- mappings: function () {
+ mappings: function initMappings() {
var myModes = config.browserModes;
mappings.add(myModes, ["a"],
"Toggle bookmarked state of current URL",
function () { bookmarks.toggle(buffer.uri.spec); });
},
- options: function () {
+ options: function initOptions() {
options.add(["defsearch", "ds"],
"The default search engine",
"string", "google",
{ completer: function completer(context) completion.searchEngine(context, true), });
},
- completion: function () {
+ completion: function initCompletion() {
completion.bookmark = function bookmark(context, tags, extra) {
context.title = ["Bookmark", "Title"];
context.format = bookmarks.format;