rem: if( !parent.opener.appCore ) return false; var homePageField = document.getElementById(folderFieldId); var url = parent.opener._content.location.href; if( url ) homePageField.value = url; return true; 
add: var windowManager = Components.classes["@mozilla.org/rdf/datasource;1?name=window-mediator"] .getService(Components.interfaces.nsIWindowMediator); var browserWindow = windowManager.getMostRecentWindow("navigator:browser"); if (browserWindow) { var browser = browserWindow.document.getElementById("content"); var url = browser.webNavigation.currentURI.spec; if (url) { var homePageField = document.getElementById(folderFieldId); homePageField.value = url; } } 
context: function setHomePageToCurrentPage(folderFieldId){  if( !parent.opener.appCore )    return false;  var homePageField = document.getElementById(folderFieldId);  var url = parent.opener._content.location.href;  if( url )    homePageField.value = url;  return true;}
meta: 5459	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5459/bccffbbaba069a33ee67f64aa9643d8302d2ae25/prefutilities.js/buggy/xpfe/components/prefwindow/resources/content/prefutilities.js