Monday, November 08, 2010 at 12:02 AM.
system.verbs.builtins.Frontier.tools.commands.addBookmark
if op.attributes.getOne ("url", @url) {
local (adrMenu = @user.bookmarksMenu.menu);
local (title, logic);
title = op.getlinetext ();
logic = "bookmarksMenu.openUrl (\"" + url + "\")";
local (menuName); //PBS 9/21/99: the name of the Bookmarks menu
bundle { //PBS 9/21/99: get the name of the Bookmarks menu
local (oldTarget = target.set (adrMenu));
op.firstSummit ();
menuName = op.getLineText ();
try {target.set (oldTarget)}};
if dialog.confirm ("Add \"" + title + "\" to the " + menuName + " menu?") {
menu.addMenuCommand (adrMenu, menuName, title, logic)}}
else { // this should never happen, but handle it anyway if it does
dialog.alert ("Can't add to the Bookmarks menu because the front window doesn't contain an addressable object.");
return}
This listing is for code that runs in the OPML Editor environment. I created these listings because I wanted the search engines to index it, so that when I want to look up something in my codebase I don't have to use the much slower search functionality in my object database. Dave Winer.