diff options
author | Matt A. Tobin <email@mattatobin.com> | 2018-02-02 07:28:34 -0500 |
---|---|---|
committer | Matt A. Tobin <email@mattatobin.com> | 2018-02-02 07:28:34 -0500 |
commit | bb23af29afc0ef21b3ee2d37e593a07f6cd7e81d (patch) | |
tree | b680d78ae1b0265afef0312cf504726ae97fbbd0 /browser/base/content | |
parent | 464e29230eeb8c25dfb064f14239b1288c85332b (diff) | |
download | UXP-bb23af29afc0ef21b3ee2d37e593a07f6cd7e81d.tar UXP-bb23af29afc0ef21b3ee2d37e593a07f6cd7e81d.tar.gz UXP-bb23af29afc0ef21b3ee2d37e593a07f6cd7e81d.tar.lz UXP-bb23af29afc0ef21b3ee2d37e593a07f6cd7e81d.tar.xz UXP-bb23af29afc0ef21b3ee2d37e593a07f6cd7e81d.zip |
Issue N/A - Restore the Toolkit Error Console - Part 2: Browser
Diffstat (limited to 'browser/base/content')
-rw-r--r-- | browser/base/content/browser-menubar.inc | 3 | ||||
-rw-r--r-- | browser/base/content/browser-sets.inc | 6 | ||||
-rwxr-xr-x | browser/base/content/browser.js | 4 | ||||
-rw-r--r-- | browser/base/content/jsConsoleOverlay.xul | 18 |
4 files changed, 31 insertions, 0 deletions
diff --git a/browser/base/content/browser-menubar.inc b/browser/base/content/browser-menubar.inc index 8f77ebafe..e952bc3ca 100644 --- a/browser/base/content/browser-menubar.inc +++ b/browser/base/content/browser-menubar.inc @@ -502,6 +502,9 @@ <menuitem id="menu_pageSource" observes="devtoolsMenuBroadcaster_PageSource" accesskey="&pageSourceCmd.accesskey;"/> + <menuitem id="javascriptConsole" + observes="devtoolsMenuBroadcaster_ErrorConsole" + accesskey="&errorConsoleCmd.accesskey;"/> </menupopup> </menu> <menuitem id="menu_pageInfo" diff --git a/browser/base/content/browser-sets.inc b/browser/base/content/browser-sets.inc index fc5bfeb7e..a5a4ae8aa 100644 --- a/browser/base/content/browser-sets.inc +++ b/browser/base/content/browser-sets.inc @@ -98,6 +98,7 @@ <command id="Tools:Search" oncommand="BrowserSearch.webSearch();"/> <command id="Tools:Downloads" oncommand="BrowserDownloadsUI();"/> <command id="Tools:Addons" oncommand="BrowserOpenAddonsMgr();"/> + <command id="Tools:ErrorConsole" oncommand="toJavaScriptConsole()"/> <command id="Tools:Sanitize" oncommand="Cc['@mozilla.org/browser/browserglue;1'].getService(Ci.nsIBrowserGlue).sanitize(window);"/> <command id="Tools:PrivateBrowsing" @@ -181,11 +182,16 @@ oncommand="SidebarUI.toggle('viewTabsSidebar');"/> <broadcaster id="workOfflineMenuitemState"/> + <broadcaster id="devtoolsMenuBroadcaster_ErrorConsole" + label="&errorConsoleCmd.label;" + command="Tools:ErrorConsole"/> + <broadcaster id="devtoolsMenuBroadcaster_PageSource" label="&pageSourceCmd.label;" key="key_viewSource" command="View:PageSource"> <observes element="canViewSource" attribute="disabled"/> + </broadcaster> </broadcasterset> diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js index b794386f7..7b05e1da7 100755 --- a/browser/base/content/browser.js +++ b/browser/base/content/browser.js @@ -3975,6 +3975,10 @@ function addToUrlbarHistory(aUrlToAdd) { PlacesUIUtils.markPageAsTyped(aUrlToAdd); } +function toJavaScriptConsole() { + toOpenWindowByType("global:console", "chrome://global/content/console.xul"); +} + function BrowserDownloadsUI() { if (PrivateBrowsingUtils.isWindowPrivate(window)) { diff --git a/browser/base/content/jsConsoleOverlay.xul b/browser/base/content/jsConsoleOverlay.xul new file mode 100644 index 000000000..1bc518d4f --- /dev/null +++ b/browser/base/content/jsConsoleOverlay.xul @@ -0,0 +1,18 @@ +<?xml version="1.0"?> +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. + +<?xul-overlay href="chrome://browser/content/macBrowserOverlay.xul"?> + +<overlay id="jsConsoleOverlay" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> + +<window id="JSConsoleWindow"> + +#include browserMountPoints.inc + +</window> + +</overlay> |