Bugzilla Bug 78619 View-source: pages have a view source option

[Remove view source option]
patch by bzbarsky@mit.edu r=timeless sr=alecf
This commit is contained in:
timeless%mac.com 2006-09-14 05:57:51 +00:00
parent d06a250b8e
commit a1a7753655

View File

@ -811,8 +811,12 @@ function loadURI(uri)
function BrowserLoadURL()
{
var url = gURLBar.value;
loadURI(getShortcutOrURI(url));
_content.focus();
if (url.match(/^view-source:/)) {
BrowserViewSourceOfURL(url.replace(/^view-source:/, ""), null);
} else {
loadURI(getShortcutOrURI(url));
_content.focus();
}
}
function getShortcutOrURI(url)
@ -899,11 +903,16 @@ function BrowserViewSource()
if (focusedWindow)
var docCharset = "charset=" + focusedWindow.document.characterSet;
//now try to open a view-source window while inheriting the charset (if any)
BrowserViewSourceOfURL(_content.location, docCharset);
}
function BrowserViewSourceOfURL(url, charset)
{
// try to open a view-source window while inheriting the charset (if any)
openDialog("chrome://navigator/content/viewSource.xul",
"_blank",
"scrollbars,resizable,chrome,dialog=no",
_content.location, docCharset);
url, charset);
}
// doc=null for regular page, doc=owner document for frame.