B2G/gecko/browser/base/content/browser-places.js
/**
   * Adds a bookmark to the page targeted by a link.
   * @param aParent
   *        The folder in which to create a new bookmark if aURL isn't
   *        bookmarked.
   * @param aURL (string)
   *        the address of the link target
   * @param aTitle
   *        The link text
   */
Adds a bookmark to the page targeted by a link.
@param aParent
The folder in which to create a new bookmark if aURL isn't
bookmarked.
@param aURL (string)
the address of the link target
@param aTitle
The link text
Adds a bookmark to the page targeted by a link . @param aParent The folder in which to create a new bookmark if aURL isn ' t bookmarked . @param aURL ( string ) the address of the link target @param aTitle The link text
function PCH_bookmarkLink(aParent, aURL, aTitle) {
    var linkURI = makeURI(aURL);
    var itemId = PlacesUtils.getMostRecentBookmarkForURI(linkURI);
    if (itemId == -1) {
      PlacesUIUtils.showBookmarkDialog({ action: "add"
                                       , type: "bookmark"
                                       , uri: linkURI
                                       , title: aTitle
                                       , hiddenRows: [ "description"
                                                     , "location"
                                                     , "loadInSidebar"
                                                     , "keyword" ]
                                       }, window);
    }
    else {
      PlacesUIUtils.showBookmarkDialog({ action: "edit"
                                       , type: "bookmark"
                                       , itemId: itemId
                                       }, window);
    }
  }
function PCH_bookmarkLink ( aParent , aURL , aTitle ) { var linkURI = makeURI ( aURL ) ; var itemId = PlacesUtils . getMostRecentBookmarkForURI ( linkURI ) ; if ( itemId == - 1 ) { PlacesUIUtils . showBookmarkDialog ( { action : "add" , type : "bookmark" , uri : linkURI , title : aTitle , hiddenRows : [ "description" , "location" , "loadInSidebar" , "keyword" ] } , window ) ; } else { PlacesUIUtils . showBookmarkDialog ( { action : "edit" , type : "bookmark" , itemId : itemId } , window ) ; } }
Adds a bookmark to the page targeted by a link.
Adds a bookmark to the page targeted by a link .