зеркало из https://github.com/mozilla/gecko-dev.git
Bug 593536 - Hide the Inspector behind a pref, r=gavin, a=blocking2.0
This commit is contained in:
Родитель
31c536a26c
Коммит
33dc57e93c
|
@ -395,11 +395,9 @@ pref("browser.bookmarks.max_backups", 10);
|
|||
|
||||
// Scripts & Windows prefs
|
||||
pref("dom.disable_open_during_load", true);
|
||||
#ifdef DEBUG
|
||||
pref("javascript.options.showInConsole", true);
|
||||
#ifdef DEBUG
|
||||
pref("general.warnOnAboutConfig", false);
|
||||
#else
|
||||
pref("javascript.options.showInConsole", false);
|
||||
#endif
|
||||
|
||||
#ifdef WINCE
|
||||
|
@ -1031,5 +1029,8 @@ pref("services.sync.prefs.sync.spellchecker.dictionary", true);
|
|||
pref("services.sync.prefs.sync.xpinstall.whitelist.required", true);
|
||||
#endif
|
||||
|
||||
// Disable the Error Console
|
||||
pref("devtools.errorconsole.enabled", false);
|
||||
|
||||
// disable the Inspector
|
||||
pref("devtools.inspector.enabled", false);
|
||||
|
|
|
@ -541,6 +541,7 @@
|
|||
key="key_inspect"
|
||||
command="Tools:Inspect"/>
|
||||
<menuitem id="javascriptConsole"
|
||||
hidden="true"
|
||||
label="&errorConsoleCmd.label;"
|
||||
accesskey="&errorConsoleCmd.accesskey;"
|
||||
key="key_errorConsole"
|
||||
|
|
|
@ -236,7 +236,7 @@
|
|||
<key id="key_openDownloads" key="&downloads.commandkey;" command="Tools:Downloads" modifiers="accel"/>
|
||||
#endif
|
||||
<key id="key_openAddons" key="&addons.commandkey;" command="Tools:Addons" modifiers="accel,shift"/>
|
||||
<key id="key_errorConsole" key="&errorConsoleCmd.commandkey;" oncommand="toJavaScriptConsole();" modifiers="accel,shift"/>
|
||||
<key id="key_errorConsole" key="&errorConsoleCmd.commandkey;" oncommand="toJavaScriptConsole();" modifiers="accel,shift" disabled="true"/>
|
||||
<key id="key_webConsole" key="&webConsoleCmd.commandkey;" oncommand="HUDConsoleUI.toggleHUD();" modifiers="accel,shift"/>
|
||||
<key id="key_inspect" key="&inspectMenu.commandkey;" command="Tools:Inspect" modifiers="accel,shift"/>
|
||||
<key id="openFileKb" key="&openFileCmd.commandkey;" command="Browser:OpenFile" modifiers="accel"/>
|
||||
|
|
|
@ -1523,6 +1523,13 @@ function delayedStartup(isLoadingBlank, mustLoadSidebar) {
|
|||
appMenuInspect.setAttribute("hidden", false);
|
||||
}
|
||||
|
||||
// Enable Error Console?
|
||||
let consoleEnabled = gPrefService.getBoolPref("devtools.errorconsole.enabled");
|
||||
if (consoleEnabled) {
|
||||
document.getElementById("javascriptConsole").hidden = false;
|
||||
document.getElementById("key_errorConsole").disabled = false;
|
||||
}
|
||||
|
||||
Services.obs.notifyObservers(window, "browser-delayed-startup-finished", "");
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче