mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-14 22:13:31 +00:00
Fix for bug#66334 - Viewsource needs to be a protocol handler
Changes to make the mozilla to use viewsource: URL r=valeski,sr=rpotts
This commit is contained in:
parent
959f4ba1b8
commit
1a90cb3c8f
@ -24,7 +24,6 @@ function viewSource(url)
|
||||
}
|
||||
|
||||
var docShellElement = document.getElementById("content");
|
||||
docShellElement.docShell.viewMode = Components.interfaces.nsIDocShell.viewSource;
|
||||
|
||||
try {
|
||||
if ("arguments" in window && window.arguments.length >= 2) {
|
||||
@ -39,7 +38,8 @@ function viewSource(url)
|
||||
}
|
||||
|
||||
var loadFlags = Components.interfaces.nsIWebNavigation.LOAD_FLAGS_NONE;
|
||||
docShellElement.webNavigation.loadURI(url, loadFlags);
|
||||
var viewSrcUrl = "view-source:" + url;
|
||||
docShellElement.webNavigation.loadURI(viewSrcUrl, loadFlags);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user