зеркало из https://github.com/mozilla/pjs.git
Bug #213538 --> remove the MOZ_THUNDERBIRD ifdef in nsWebShell.cpp. Add moz thunderbird functionality to OnStartURI to kick
non mail urls out to the operating system. Also, break out a method on nsIMessenger for thunderbird which can be used to launch urls externally instead of doubling up inside of loadUrl.
This commit is contained in:
Родитель
3e34664534
Коммит
4dc3a1f88f
|
@ -63,6 +63,17 @@
|
|||
versionField.value = hidversionField.value;
|
||||
versionField.width = hidversionField.width;
|
||||
}
|
||||
|
||||
function loadExternalLink() {
|
||||
try {
|
||||
var messenger = Components.classes["@mozilla.org/messenger;1"].createInstance();
|
||||
messenger = messenger.QueryInterface(Components.interfaces.nsIMessenger);
|
||||
messenger.launchExternalURL(document.getElementById('copyrightLink').getAttribute("href"));
|
||||
} catch (ex) {}
|
||||
|
||||
// return false, so we don't load the href in the about dialog
|
||||
return false;
|
||||
}
|
||||
]]>
|
||||
</script>
|
||||
|
||||
|
@ -78,7 +89,7 @@
|
|||
|
||||
<separator class="thin"/>
|
||||
|
||||
<html:a href="©rightLink;" style="display: block; color: blue; text-decoration: underline;" tabindex="3">©right;</html:a>
|
||||
<html:a id="copyrightLink" onclick="return loadExternalLink();" href="©rightLink;" style="display: block; color: blue; text-decoration: underline;" tabindex="3">©right;</html:a>
|
||||
</vbox>
|
||||
<separator class="groove"/>
|
||||
|
||||
|
|
|
@ -2238,6 +2238,6 @@ function loadThrobberUrl(urlPref)
|
|||
var url;
|
||||
try {
|
||||
url = gPrefs.getComplexValue(urlPref, Components.interfaces.nsIPrefLocalizedString).data;
|
||||
messenger.loadURL(window, url);
|
||||
messenger.launchExternalURL(url);
|
||||
} catch (ex) {}
|
||||
}
|
||||
|
|
|
@ -487,7 +487,7 @@ function MapIt(id)
|
|||
try {
|
||||
var messenger = Components.classes["@mozilla.org/messenger;1"].createInstance();
|
||||
messenger = messenger.QueryInterface(Components.interfaces.nsIMessenger);
|
||||
messenger.loadURL(window, button.getAttribute('url'));
|
||||
messenger.launchExternalURL(button.getAttribute('url'));
|
||||
} catch (ex) {}
|
||||
}
|
||||
|
||||
|
@ -512,7 +512,7 @@ function openLink(id)
|
|||
try {
|
||||
var messenger = Components.classes["@mozilla.org/messenger;1"].createInstance();
|
||||
messenger = messenger.QueryInterface(Components.interfaces.nsIMessenger);
|
||||
messenger.loadURL(window, document.getElementById(id).getAttribute("href"));
|
||||
messenger.launchExternalURL(document.getElementById(id).getAttribute("href"));
|
||||
} catch (ex) {}
|
||||
|
||||
// return false, so we don't load the href in the addressbook window
|
||||
|
|
|
@ -830,6 +830,6 @@ function loadThrobberUrl(urlPref)
|
|||
url = gPrefs.getComplexValue(urlPref, Components.interfaces.nsIPrefLocalizedString).data;
|
||||
var messenger = Components.classes["@mozilla.org/messenger;1"].createInstance();
|
||||
messenger = messenger.QueryInterface(Components.interfaces.nsIMessenger);
|
||||
messenger.loadURL(window, url);
|
||||
messenger.launchExternalURL(url);
|
||||
} catch (ex) {}
|
||||
}
|
|
@ -2928,7 +2928,7 @@ function loadThrobberUrl(urlPref)
|
|||
url = sPrefs.getComplexValue(urlPref, Components.interfaces.nsIPrefLocalizedString).data;
|
||||
var messenger = Components.classes["@mozilla.org/messenger;1"].createInstance();
|
||||
messenger = messenger.QueryInterface(Components.interfaces.nsIMessenger);
|
||||
messenger.loadURL(window, url);
|
||||
messenger.launchExternalURL(url);
|
||||
} catch (ex) {}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче