зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1141122: supply a more canonical alternative to about:loopconversation in Loop conversation gUM prompts. r=florian
This commit is contained in:
Родитель
3f4e59d102
Коммит
bbb45546ef
|
@ -167,8 +167,15 @@ function getHost(uri, href) {
|
|||
} catch (ex) {};
|
||||
if (!host) {
|
||||
if (uri && uri.scheme.toLowerCase() == "about") {
|
||||
// For about URIs, just use the full spec, without any #hash parts
|
||||
host = uri.specIgnoringRef;
|
||||
// Special case-ing Loop/ Hello gUM requests.
|
||||
if (uri.specIgnoringRef == "about:loopconversation") {
|
||||
const kBundleURI = "chrome://browser/locale/loop/loop.properties";
|
||||
let bundle = Services.strings.createBundle(kBundleURI);
|
||||
host = bundle.GetStringFromName("clientShortname2");
|
||||
} else {
|
||||
// For other about URIs, just use the full spec, without any #hash parts.
|
||||
host = uri.specIgnoringRef;
|
||||
}
|
||||
} else {
|
||||
// This is unfortunate, but we should display *something*...
|
||||
const kBundleURI = "chrome://browser/locale/browser.properties";
|
||||
|
|
Загрузка…
Ссылка в новой задаче