Add a debug menu item for turning on / turning off url dispatching

r=travis


git-svn-id: svn://10.0.0.236/trunk@53848 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
mscott%netscape.com
1999-11-18 06:58:22 +00:00
parent 16d83b9a69
commit 446a6ec0c7
4 changed files with 58 additions and 2 deletions

View File

@@ -1337,3 +1337,23 @@ function dumpMemoryLeaks() {
if (leakDetector != null)
leakDetector.dumpLeaks();
}
function enableUriLoading() {
var pref = Components.classes['component://netscape/preferences'];
if (pref)
{
pref = pref.getService();
pref = pref.QueryInterface(Components.interfaces.nsIPref);
pref.SetDefaultBoolPref("browser.uriloader", true);
}
}
function disableUriLoading() {
var pref = Components.classes['component://netscape/preferences'];
if (pref)
{
pref = pref.getService();
pref = pref.QueryInterface(Components.interfaces.nsIPref);
pref.SetDefaultBoolPref("browser.uriloader", false);
}
}

View File

@@ -508,7 +508,15 @@ Contributor(s): ______________________________________. -->
<menuitem value="&browserbuster.label;" oncommand="window.content.location.href='http://komodo.mozilla.org/buster'"/>
<!-- TEMPORARY UNTIL -edit WORKS TO STARTUP COMPOSER (bug 16789) -->
<menuitem value="Composer with Test Page" oncommand="window.openDialog('chrome://editor/content','_blank','chrome,all,dialog=no','chrome://editor/content/EditorInitPage.html')"/>
</menupopup>
<menuseparator />
<menu value="&URIDispatchingCmd.label;">
<menupopup>
<menuitem value="&URIDispatchingEnableCmd.label;" oncommand="enableUriLoading();"/>
<menuitem value="&URIDispatchingDisableCmd.label;" oncommand="disableUriLoading();"/>
</menupopup>
</menu>
</menupopup>
</menu>
<menu accesskey="q" value="&QA.label;">

View File

@@ -1337,3 +1337,23 @@ function dumpMemoryLeaks() {
if (leakDetector != null)
leakDetector.dumpLeaks();
}
function enableUriLoading() {
var pref = Components.classes['component://netscape/preferences'];
if (pref)
{
pref = pref.getService();
pref = pref.QueryInterface(Components.interfaces.nsIPref);
pref.SetDefaultBoolPref("browser.uriloader", true);
}
}
function disableUriLoading() {
var pref = Components.classes['component://netscape/preferences'];
if (pref)
{
pref = pref.getService();
pref = pref.QueryInterface(Components.interfaces.nsIPref);
pref.SetDefaultBoolPref("browser.uriloader", false);
}
}

View File

@@ -508,7 +508,15 @@ Contributor(s): ______________________________________. -->
<menuitem value="&browserbuster.label;" oncommand="window.content.location.href='http://komodo.mozilla.org/buster'"/>
<!-- TEMPORARY UNTIL -edit WORKS TO STARTUP COMPOSER (bug 16789) -->
<menuitem value="Composer with Test Page" oncommand="window.openDialog('chrome://editor/content','_blank','chrome,all,dialog=no','chrome://editor/content/EditorInitPage.html')"/>
</menupopup>
<menuseparator />
<menu value="&URIDispatchingCmd.label;">
<menupopup>
<menuitem value="&URIDispatchingEnableCmd.label;" oncommand="enableUriLoading();"/>
<menuitem value="&URIDispatchingDisableCmd.label;" oncommand="disableUriLoading();"/>
</menupopup>
</menu>
</menupopup>
</menu>
<menu accesskey="q" value="&QA.label;">