Bug 1259929. Support filtering about:config via ?filter param. r=capella
authorMike Taylor <miket@mozilla.com>
Sat, 26 Mar 2016 08:29:22 -0500
changeset 290665 2f55fe267f0a232585e269aa29099ab664c074f8
parent 290664 2c8a3acfb48c772cfc2f0417738590bc607ce110
child 290666 0df89ff664727fb2c28c21000a5692805fb26890
push id30125
push usercbook@mozilla.com
push dateTue, 29 Mar 2016 12:16:24 +0000
treeherdermozilla-central@d5d53a3b4e50 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerscapella
bugs1259929
milestone48.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1259929. Support filtering about:config via ?filter param. r=capella
mobile/android/chrome/content/config.js
--- a/mobile/android/chrome/content/config.js
+++ b/mobile/android/chrome/content/config.js
@@ -204,16 +204,22 @@ var AboutConfig = {
     this._prefsContainer = document.getElementById("prefs-container");
     this._loadingContainer = document.getElementById("loading-container");
 
     let list = Services.prefs.getChildList("");
     this._list = list.sort().map( function AC_getMapPref(aPref) {
       return new Pref(aPref);
     }, this);
 
+    // Support filtering about:config via a ?filter=<string> param
+    let match = /[?&]filter=([^&]+)/i.exec(window.location.href);
+    if (match) {
+      this.filterInput.value = decodeURIComponent(match[1]);
+    }
+
     // Display the current prefs list (retains searchFilter value)
     this.bufferFilterInput();
 
     // Setup the prefs observers
     Services.prefs.addObserver("", this, false);
   },
 
   // Uninit the main AboutConfig dialog