diff --git a/.eslintignore b/.eslintignore index f9cce2b787d3..134b70dc496e 100644 --- a/.eslintignore +++ b/.eslintignore @@ -138,8 +138,9 @@ devtools/shared/qrcode/tests/mochitest/test_decode.html devtools/shared/tests/mochitest/*.html devtools/shared/webconsole/test/test_*.html -# Ignore devtools pre-processed files +# Ignore devtools preferences files devtools/client/preferences/** +devtools/shim/devtools-startup-prefs.js # Ignore devtools third-party libs devtools/shared/jsbeautify/* diff --git a/browser/installer/package-manifest.in b/browser/installer/package-manifest.in index aa4a636f77fc..e7206bf67fd1 100644 --- a/browser/installer/package-manifest.in +++ b/browser/installer/package-manifest.in @@ -630,6 +630,7 @@ ; [DevTools Shim Files] @RESPATH@/browser/chrome/devtools-shim@JAREXT@ @RESPATH@/browser/chrome/devtools-shim.manifest +@RESPATH@/browser/@PREF_DIR@/devtools-startup-prefs.js ; shell icons #ifdef XP_UNIX diff --git a/devtools/client/preferences/devtools.js b/devtools/client/preferences/devtools.js index 00c3eba1d359..62d37fb46517 100644 --- a/devtools/client/preferences/devtools.js +++ b/devtools/client/preferences/devtools.js @@ -352,8 +352,5 @@ pref("devtools.editor.autocomplete", true); // version for each user. pref("devtools.telemetry.tools.opened.version", "{}"); -// Enable the JSON View tool (an inspector for application/json documents). -pref("devtools.jsonview.enabled", true); - // Enable the HTML responsive design mode for all channels. pref("devtools.responsive.html.enabled", true); diff --git a/devtools/shim/devtools-startup-prefs.js b/devtools/shim/devtools-startup-prefs.js new file mode 100644 index 000000000000..6e6610681188 --- /dev/null +++ b/devtools/shim/devtools-startup-prefs.js @@ -0,0 +1,12 @@ +/* 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/. */ + +// This Devtools preferences file will be loaded as a usual Firefox preferences file. +// Most DevTools prefs are included with the addon and loaded dynamically during the addon +// startup. For preferences that are required before the addon is loaded or that we can't +// process in JS, they can be defined in this file. +// Note that this preference file follows Firefox release cycle. + +// Enable the JSON View tool (an inspector for application/json documents). +pref("devtools.jsonview.enabled", true); diff --git a/devtools/shim/moz.build b/devtools/shim/moz.build index 4c73beef419b..142c93303f71 100644 --- a/devtools/shim/moz.build +++ b/devtools/shim/moz.build @@ -6,6 +6,10 @@ JAR_MANIFESTS += ['jar.mn'] +JS_PREFERENCE_FILES += [ + 'devtools-startup-prefs.js', +] + # Register the about:debugging page only for 'addon' and 'all' builds. if CONFIG['MOZ_DEVTOOLS'] != 'server': EXTRA_COMPONENTS += [