Page 1 of 1

Where are the "appearance" settings stored?

Posted: Fri Nov 25, 2022 8:28 am
by troglodyte
Hi...

Instead of using cCleaner I regularly "neutralise" the Firefox profile folder with a batch file containing DOS commands of the kind "if exist... del... /s/q" and "if exist... rd... /s/q", which works well (the sqlite files that contain the NS blocklist, permissions, etc., are, of course, not removed).

But running the batch file resets the NS appearance settings to their default values, so I would like to know where those settings are stored (it would also be interesting, although not essential, to know why just those settings are not stored in the same place as all the other settings).

Thanks in advance...

Re: Where are the "appearance" settings stored?

Posted: Fri Nov 25, 2022 8:48 am
by Giorgio Maone
They're stored both in the "usual" place (i.e. in the extension's privileged storage area) and in the DOM storage of the extension's origin.

This redundancy has been implemented because the API to access the privileged storage is asynchronous, and therefore some flickering would be possible when applying the style. By using also the asynchronous DOM storage API we can apply the style before the UI is shown.

Why not using just the latter? Because it can be disabled and/or erased by users who wipe out all per-site data (i.e. cookies, cache & DOM storage) on exit: in that case we can fall back on privileged storage.

Re: Where are the "appearance" settings stored?

Posted: Sat Nov 26, 2022 8:27 pm
by troglodyte
Roger.

So I found the additional prefs in "profile\storage\default", in the subdirectories whose names start with "moz-extension".

I've added a "for loop" to the batch file now that only deletes those subdirectories in "profile\storage\default" whose names start with "http" and therefore leaves NS's subdirectories alone.

The appearance prefs now persist - problem solved.

Thank you!

Re: Where are the "appearance" settings stored?

Posted: Mon Jan 23, 2023 2:47 am
by barbaz
OP upgraded to a new Firefox version and started a new thread for basically this same topic, but for the newer Firefox version - viewtopic.php?t=26900

Locking in favor of the new thread.