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 290724 2f55fe267f0a232585e269aa29099ab664c074f8
parent 290723 2c8a3acfb48c772cfc2f0417738590bc607ce110
child 290725 0df89ff664727fb2c28c21000a5692805fb26890
push id19656
push usergwagner@mozilla.com
push dateMon, 04 Apr 2016 13:43:23 +0000
treeherderb2g-inbound@e99061fde28a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerscapella
bugs1259929
milestone48.0a1
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