rem: var windowManager = Components.classes[WINDOWMEDIATOR_CONTRACTID] .getService(nsIWindowMediator); var browser, url; var browserWindow = windowManager.getMostRecentWindow("navigator:browser"); if (browserWindow) { browser = browserWindow.document.getElementById("content"); if (browser) { url = browser.webNavigation.currentURI.spec; } } 
add: var url; var tabbrowser = getMostRecentBrowser(); if (tabbrowser) url = tabbrowser.currentURI.spec; 
context: function getCurrentPage(){  var windowManager = Components.classes[WINDOWMEDIATOR_CONTRACTID]                                .getService(nsIWindowMediator);  var browser, url;  var browserWindow = windowManager.getMostRecentWindow("navigator:browser");  if (browserWindow) {    browser = browserWindow.document.getElementById("content");    if (browser) {      url = browser.webNavigation.currentURI.spec;    }  }  return url;}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/487926ab1d992a980006843e7d1eb6a001a7a6cc/pref-navigator.js/clean/suite/common/pref/pref-navigator.js