Where/how are settings stored? #3583
-
Hi everyone, I'm trying to save my tree style tab settings and user style sheet in a dotfile repo for syncing and version control, and then automatically copy them back into my Firefox profile folder (~/.mozilla/firefox//) when I need to. So far, the closest I have come up with is saving the CSS and exporting all settings in a JSON from Development -> All Configs. I could figure out a script to convert the raw CSS to chunked data and automatically construct a complete settings JSON, but I would like to import the settings with a single script rather than manually importing from the settings page. My actual questions are:
Thanks in advance for any knowledge you can share. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
In general, I know that TST CSS is synchronized using Firefox Sync. This means that when you make a modification to the CSS it would get propagated to all your Firefox profiles hooked up to sync. You can try this by populating some TST CSS, then create a new profile enabled for sync and the CSS will be populated automatically after a sync. So, not sure if they reduces your need to try to save off and load the CSS manually. Like you said you can dump out everything from the All Configs, but you can also just use the "Save as File" button at the bottom of the CSS editor to save your CSS as text. There is a "Load from File" button as well. |
Beta Was this translation helpful? Give feedback.
-
Update: I did a little more poking around the profile folder and googling and found what I was looking for. Firefox saves extension settings in Mozilla's IDB format, which as far as I can tell is based on a SQLite database. Someone has answered this question here on StackOverflow and developed a Python tool that can read, but not yet write to the database, and I confirmed that by passing the right parameters into this tool, I can get a dump of the settings that matches the JSON dump. |
Beta Was this translation helpful? Give feedback.
Update: I did a little more poking around the profile folder and googling and found what I was looking for.
Firefox saves extension settings in Mozilla's IDB format, which as far as I can tell is based on a SQLite database.
Someone has answered this question here on StackOverflow and developed a Python tool that can read, but not yet write to the database, and I confirmed that by passing the right parameters into this tool, I can get a dump of the settings that matches the JSON dump.