B2G/gecko/browser/components/places/content/places.js
/**
   * Allows simple exporting of bookmarks.
   */
Allows simple exporting of bookmarks.
Allows simple exporting of bookmarks .
function PO_exportBookmarks() {
    let fp = Cc["@mozilla.org/filepicker;1"].createInstance(Ci.nsIFilePicker);
    let fpCallback = function fpCallback_done(aResult) {
      if (aResult != Ci.nsIFilePicker.returnCancel) {
        let exporter =
          Cc["@mozilla.org/browser/places/import-export-service;1"].
            getService(Ci.nsIPlacesImportExportService);
        exporter.exportHTMLToFile(fp.file);
      }
    };
    fp.init(window, PlacesUIUtils.getString("EnterExport"),
            Ci.nsIFilePicker.modeSave);
    fp.appendFilters(Ci.nsIFilePicker.filterHTML);
    fp.defaultString = "bookmarks.html";
    fp.open(fpCallback);
  }
function PO_exportBookmarks ( ) { let fp = Cc [ "@mozilla.org/filepicker;1" ] . createInstance ( Ci . nsIFilePicker ) ; let fpCallback = function fpCallback_done ( aResult ) { if ( aResult != Ci . nsIFilePicker . returnCancel ) { let exporter = Cc [ "@mozilla.org/browser/places/import-export-service;1" ] . getService ( Ci . nsIPlacesImportExportService ) ; exporter . exportHTMLToFile ( fp . file ) ; } } ; fp . init ( window , PlacesUIUtils . getString ( "EnterExport" ) , Ci . nsIFilePicker . modeSave ) ; fp . appendFilters ( Ci . nsIFilePicker . filterHTML ) ; fp . defaultString = "bookmarks.html" ; fp . open ( fpCallback ) ; }
Allows simple exporting of bookmarks.
Allows simple exporting of bookmarks .