зеркало из https://github.com/mozilla/pjs.git
remove ^M characters
This commit is contained in:
Родитель
935558b3b4
Коммит
eb271b4ce6
|
@ -250,23 +250,23 @@ function openRegionURL(aResourceName)
|
||||||
} catch (ex) {}
|
} catch (ex) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fetches the url for the passed in pref name, formats it and then loads it in the default
|
* Fetches the url for the passed in pref name, formats it and then loads it in the default
|
||||||
* browser.
|
* browser.
|
||||||
*
|
*
|
||||||
* @param aPrefName - name of the pref that holds the url we want to format and open
|
* @param aPrefName - name of the pref that holds the url we want to format and open
|
||||||
*/
|
*/
|
||||||
function openFormattedRegionURL(aPrefName)
|
function openFormattedRegionURL(aPrefName)
|
||||||
{
|
{
|
||||||
var formatter = Components.classes["@mozilla.org/toolkit/URLFormatterService;1"]
|
var formatter = Components.classes["@mozilla.org/toolkit/URLFormatterService;1"]
|
||||||
.getService(Components.interfaces.nsIURLFormatter);
|
.getService(Components.interfaces.nsIURLFormatter);
|
||||||
var formattedUrl = formatter.formatURLPref(aPrefName);
|
var formattedUrl = formatter.formatURLPref(aPrefName);
|
||||||
|
|
||||||
var uri = Components.classes["@mozilla.org/network/io-service;1"]
|
var uri = Components.classes["@mozilla.org/network/io-service;1"]
|
||||||
.getService(Components.interfaces.nsIIOService)
|
.getService(Components.interfaces.nsIIOService)
|
||||||
.newURI(formattedUrl, null, null);
|
.newURI(formattedUrl, null, null);
|
||||||
|
|
||||||
var protocolSvc = Components.classes["@mozilla.org/uriloader/external-protocol-service;1"]
|
var protocolSvc = Components.classes["@mozilla.org/uriloader/external-protocol-service;1"]
|
||||||
.getService(Components.interfaces.nsIExternalProtocolService);
|
.getService(Components.interfaces.nsIExternalProtocolService);
|
||||||
protocolSvc.loadUrl(uri);
|
protocolSvc.loadUrl(uri);
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче