зеркало из https://github.com/mozilla/pjs.git
Bug 220589 - [Mac] Command-Enter and Command-Shift-Enter (in the location bar) should work like windows/linux builds. r=mconnor
This commit is contained in:
Родитель
3f7a298b3d
Коммит
6e3c278bea
|
@ -1906,16 +1906,22 @@ function canonizeUrl(aTriggeringEvent, aPostDataRef)
|
|||
var url = gURLBar.value;
|
||||
|
||||
// Prevent suffix when already exists www , http , /
|
||||
if (!/^(www|http)|\/\s*$/i.test(url)) {
|
||||
if (!/^(www|http)|\/\s*$/i.test(url) && aTriggeringEvent) {
|
||||
var suffix = null;
|
||||
#ifdef XP_MACOSX
|
||||
var accelPressed = 'metaKey' in aTriggeringEvent &&
|
||||
aTriggeringEvent.metaKey;
|
||||
#else
|
||||
var accelPressed = 'ctrlKey' in aTriggeringEvent &&
|
||||
aTriggeringEvent.ctrlKey;
|
||||
#endif
|
||||
var shiftPressed = 'shiftKey' in aTriggeringEvent &&
|
||||
aTriggeringEvent.shiftKey;
|
||||
|
||||
if (aTriggeringEvent && 'ctrlKey' in aTriggeringEvent &&
|
||||
aTriggeringEvent.ctrlKey && 'shiftKey' in aTriggeringEvent &&
|
||||
aTriggeringEvent.shiftKey)
|
||||
if (accelPressed && shiftPressed)
|
||||
suffix = ".org/";
|
||||
|
||||
else if (aTriggeringEvent && 'ctrlKey' in aTriggeringEvent &&
|
||||
aTriggeringEvent.ctrlKey)
|
||||
else if (accelPressed)
|
||||
{
|
||||
try {
|
||||
suffix = gPrefService.getCharPref("browser.fixup.alternate.suffix");
|
||||
|
@ -1927,8 +1933,7 @@ function canonizeUrl(aTriggeringEvent, aPostDataRef)
|
|||
}
|
||||
}
|
||||
|
||||
else if (aTriggeringEvent && 'shiftKey' in aTriggeringEvent &&
|
||||
aTriggeringEvent.shiftKey)
|
||||
else if (shiftPressed)
|
||||
suffix = ".net/";
|
||||
|
||||
if (suffix != null) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче