rem:  const kPrefContractID = "@mozilla.org/preferences;1"; const kPrefIID = Components.interfaces.nsIPref; const kPrefSvc = Components.classes[kPrefContractID].getService(kPrefIID); var showDialog = true; try { showDialog = !kPrefSvc.GetBoolPref("browser.bookmarks.add_without_dialog"); } catch (e) { }    if (navigator.platform.toLowerCase().indexOf("mac") != -1) { showDialog = false; }  if (showDialog) openDialog("chrome: "centerscreen,chrome,dialog=no,resizable=no", title, url, null, docCharset); else {   const kBMSvcContractID = "@mozilla.org/browser/bookmarks-service;1"; const kBMSvcIID = Components.interfaces.nsIBookmarksService; const kBMSvc = Components.classes[kBMSvcContractID].getService(kBMSvcIID); kBMSvc.AddBookmark(url, title, kBMSvcIID.BOOKMARK_DEFAULT_TYPE, docCharset); } } 
add: this.addBookmark(url, title, docCharset); }, 
context:   addBookmarkToWindow: function (aWindow)  {    var url = aWindow.location.href;    var title = aWindow.document.title || url;    var docCharset = aWindow.document.characterSet;    const kPrefContractID = "@mozilla.org/preferences;1";    const kPrefIID = Components.interfaces.nsIPref;    const kPrefSvc = Components.classes[kPrefContractID].getService(kPrefIID);    var showDialog = true;    try {      showDialog = !kPrefSvc.GetBoolPref("browser.bookmarks.add_without_dialog");    }    catch (e) {    }    // XXX - 0.8 hack - prevent dialog from appearing on Mac, as there are    //       crashes in optimized builds.     if (navigator.platform.toLowerCase().indexOf("mac") != -1) {      showDialog = false;    }        if (showDialog)      openDialog("chrome://communicator/content/bookmarks/addBookmark.xul", "",                  "centerscreen,chrome,dialog=no,resizable=no", title, url, null, docCharset);    else {      // User has elected to override the file dialog and always file bookmarks      // into the default bookmark folder.       const kBMSvcContractID = "@mozilla.org/browser/bookmarks-service;1";      const kBMSvcIID = Components.interfaces.nsIBookmarksService;      const kBMSvc = Components.classes[kBMSvcContractID].getService(kBMSvcIID);      kBMSvc.AddBookmark(url, title, kBMSvcIID.BOOKMARK_DEFAULT_TYPE, docCharset);    }  }
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/8f8ee25f56f3b7656131e92a886b436476e19217/bookmarksOverlay.js/clean/xpfe/components/bookmarks/resources/bookmarksOverlay.js