MozillaZine

Extract all keys/values from about:config

User Help for Mozilla Firefox
Diorser

User avatar
 
Posts: 934
Joined: June 22nd, 2005, 6:57 am

Post Posted October 16th, 2017, 1:08 pm

Hi,
Which method or linux script could be used to extract ALL keys/values visible in about:config ?
Thanks.

Grumpus

User avatar
 
Posts: 11929
Joined: October 19th, 2007, 4:23 am
Location: ... Da' Swamp

Post Posted October 16th, 2017, 2:04 pm

Best guess is it's going to be a line item by line item modification.
Unless there is some developer script, try Moz Developer site/

Diorser

User avatar
 
Posts: 934
Joined: June 22nd, 2005, 6:57 am

Post Posted October 16th, 2017, 2:21 pm

Formulated differently, only modified keys are in prefs.js.
But in which file(s) are other keys with their default value ? This would solve my request.

Brummelchen
 
Posts: 3515
Joined: March 19th, 2005, 10:51 am

Post Posted October 16th, 2017, 3:09 pm

only modified keys are in prefs.js.

wrong - some and/or needed keys are in pref. which of those are changed -> look about:support

whats your purpose? what do you try to save? more details are helpful instead searching the needle in a haystack.

dickvl

User avatar
 
Posts: 52386
Joined: July 18th, 2005, 3:25 am

Post Posted October 16th, 2017, 5:36 pm

I once posted a script to format the about:config for printing.
Maybe that can help.
Most code I posted is probably outdated, but this still seems to work in the Browser Console.
http://kb.mozillazine.org/User:Dickvl/J ... s_Printing

Keep in mind that there are hidden prefs that do not show on the about:config page, but when not defined assume a specific default value.
You would have to search the Firefox source code on the DXR website to track such prefs.
https://dxr.mozilla.org

Diorser

User avatar
 
Posts: 934
Joined: June 22nd, 2005, 6:57 am

Post Posted October 17th, 2017, 8:34 am

Interesting, but ... a bit heavier than a simple global copy/paste of about:config...., or execution of a bash script.
The documentation seems also a bit obsolete anyway.
http://kb.mozillazine.org/Firefox_:_FAQ ... ig_Entries

I did not succeed either with the dev tools.
Sure someone knows how to get these key/values, but may be not on this forum.

Reflective

User avatar
 
Posts: 2283
Joined: February 15th, 2007, 11:13 am

Post Posted October 17th, 2017, 8:50 am

It wouldn't surprise me at all if somebody hasn't uploaded a dump of about:config settings to Pastebin. The site has a Search option at the top so maybe it'll be worth a look. Here's the result of one I ran myself: https://pastebin.com/kX7yhrmp

morat
 
Posts: 2713
Joined: February 3rd, 2009, 6:29 pm

Post Posted October 17th, 2017, 9:11 am

Here is my less well done version.

viewtopic.php?p=12347795#p12347795

I had to disable multiprocess windows to get the code to work.

* set browser.tabs.remote.autostart.2 pref to false
* restart

Then check if the option is disabled in the about:support page.

Diorser

User avatar
 
Posts: 934
Joined: June 22nd, 2005, 6:57 am

Post Posted October 17th, 2017, 12:53 pm

Ok; and afterwards, what do you do with the output ?

Code: Select all
Exception: TypeError: tree is null
@Scratchpad/1:13:17
evalWithDebugger@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/server/actors/webconsole.js:1378:16
onEvaluateJS@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/server/actors/webconsole.js:894:20
onEvaluateJSAsync@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/server/actors/webconsole.js:865:20
onPacket@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/server/main.js:1799:15
send/<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/shared/transport/transport.js:570:13
exports.makeInfallible/<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/shared/ThreadSafeDevToolsUtils.js:101:14
exports.makeInfallible/<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/shared/ThreadSafeDevToolsUtils.js:101:14

Brummelchen
 
Posts: 3515
Joined: March 19th, 2005, 10:51 am

Post Posted October 17th, 2017, 1:11 pm

windows 8 & firefox 56/57
TypeError: Cc is undefined

no output

btw javascript envrinement (shift+f4) seems better than web console - but the result is same

dickvl

User avatar
 
Posts: 52386
Joined: July 18th, 2005, 3:25 am

Post Posted October 17th, 2017, 5:46 pm

You need to use the Browser Console or Scratchpad in Browser context to run privileged JavaScript code (Cc = Components.classes).
https://developer.mozilla.org/en/Tools/ ... mmand_line
devtools.chrome.enabled = true

Brummelchen
 
Posts: 3515
Joined: March 19th, 2005, 10:51 am

Post Posted October 17th, 2017, 6:32 pm

was enabled (v57)

therube

User avatar
 
Posts: 18791
Joined: March 10th, 2004, 9:59 pm
Location: Maryland USA

Post Posted October 17th, 2017, 9:32 pm

extract ALL keys/values visible in about:config

What do you mean by that?
It's a text file, so I'm not following what you're looking to accomplish?

https://addons.mozilla.org/en-US/firefo ... ig-export/


instalDir/omni.ja/greprefs.js may hold (some?) defaults?
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14 Pinball CopyURL+ FetchTextURL FlashGot NoScript

Diorser

User avatar
 
Posts: 934
Joined: June 22nd, 2005, 6:57 am

Post Posted October 17th, 2017, 10:36 pm

@therube
Looks perfect.
Thanks.

morat
 
Posts: 2713
Joined: February 3rd, 2009, 6:29 pm

Post Posted October 18th, 2017, 2:00 am

Brummelchen wrote:was enabled (v57)

I got dickvl code working in Fx 57 with a little tweak. (remove "2" in nsIPrefBranch2)

Code: Select all
- const gPrefBranch = gPrefService.getBranch(null).QueryInterface(Ci.nsIPrefBranch2);
+ const gPrefBranch = gPrefService.getBranch(null).QueryInterface(Ci.nsIPrefBranch);

I had to disable multiprocess windows to get the code to work.

My code only works with about:config as the selected tab. It's best to wrap the code since the developers changed the scope in newer versions.

Code: Select all
(function(){

  ...

})();

Scratchpad Sandbox
viewtopic.php?f=9&t=2865047

Return to Firefox Support


Who is online

Users browsing this forum: Bing [Bot] and 6 guests