B2G/gecko/browser/base/content/browser-places.js
/**
   * Adds a Live Bookmark to a feed associated with the current page. 
   * @param     url
   *            The nsIURI of the page the feed was attached to
   * @title     title
   *            The title of the feed. Optional.
   * @subtitle  subtitle
   *            A short description of the feed. Optional.
   */
Adds a Live Bookmark to a feed associated with the current page.
@param     url
The nsIURI of the page the feed was attached to
@title     title
The title of the feed. Optional.
@subtitle  subtitle
A short description of the feed. Optional.
Adds a Live Bookmark to a feed associated with the current page . @param url The nsIURI of the page the feed was attached to @title title The title of the feed . Optional . @subtitle subtitle A short description of the feed . Optional .
function PCH_addLiveBookmark(url, feedTitle, feedSubtitle) {
    var feedURI = makeURI(url);
    var doc = gBrowser.contentDocument;
    var title = (arguments.length > 1) ? feedTitle : doc.title;
    var description;
    if (arguments.length > 2)
      description = feedSubtitle;
    else
      description = PlacesUIUtils.getDescriptionFromDocument(doc);
    var toolbarIP = new InsertionPoint(PlacesUtils.toolbarFolderId, -1);
    PlacesUIUtils.showBookmarkDialog({ action: "add"
                                     , type: "livemark"
                                     , feedURI: feedURI
                                     , siteURI: gBrowser.currentURI
                                     , title: title
                                     , description: description
                                     , defaultInsertionPoint: toolbarIP
                                     , hiddenRows: [ "feedLocation"
                                                   , "siteLocation"
                                                   , "description" ]
                                     }, window);
  }
function PCH_addLiveBookmark ( url , feedTitle , feedSubtitle ) { var feedURI = makeURI ( url ) ; var doc = gBrowser . contentDocument ; var title = ( arguments . length > 1 ) ? feedTitle : doc . title ; var description ; if ( arguments . length > 2 ) description = feedSubtitle ; else description = PlacesUIUtils . getDescriptionFromDocument ( doc ) ; var toolbarIP = new InsertionPoint ( PlacesUtils . toolbarFolderId , - 1 ) ; PlacesUIUtils . showBookmarkDialog ( { action : "add" , type : "livemark" , feedURI : feedURI , siteURI : gBrowser . currentURI , title : title , description : description , defaultInsertionPoint : toolbarIP , hiddenRows : [ "feedLocation" , "siteLocation" , "description" ] } , window ) ; }
Adds a Live Bookmark to a feed associated with the current page.
Adds a Live Bookmark to a feed associated with the current page .