Codice
function chromeToFileUrl(url) {
return Cc['@mozilla.org/chrome/chrome-registry;1']
.getService(Ci.nsIChromeRegistry)
.convertChromeURL(
Cc['@mozilla.org/network/io-service;1']
.getService(Ci.nsIIOService)
.newURI(url, null, null)).spec;
}