Good to remove all extension preferences on uninstall?

Talk about code development, features, specific bugs, enhancements, patches, and similar things.
Forum rules
Please keep everything here strictly on-topic.
This board is meant for Pale Moon source code development related subjects only like code snippets, patches, specific bugs, git, the repositories, etc.

This is not for tech support! Please do not post tech support questions in the "Development" board!
Please make sure not to use this board for support questions. Please post issues with specific websites, extensions, etc. in the relevant boards for those topics.

Please keep things on-topic as this forum will be used for reference for Pale Moon development. Expect topics that aren't relevant as such to be moved or deleted.
User avatar
moonbat
Knows the dark side
Knows the dark side
Posts: 4980
Joined: 2015-12-09, 15:45
Contact:

Good to remove all extension preferences on uninstall?

Unread post by moonbat » 2021-06-12, 03:10

Is this a good practice?
I've added a cleanup routine to my extensions by hooking into AddonManager.jsm so that if uninstallation is confirmed it will delete its own preferences. On the one hand, good to clean up and reduce clutter in about:config. On the other hand, in case the user reinstalls the extension, their settings will remain as they are (an example is when you replace DownThemAll with its fork GetEmAll - since it uses the same preferences, all your settings and download history continue as they are).
"One hosts to look them up, one DNS to find them and in the darkness BIND them."

Image
Linux Mint 21 Xfce x64 on HP i5-5200 laptop, 12 GB RAM.
AutoPageColor|PermissionsPlus|PMPlayer|Pure URL|RecordRewind|TextFX

New Tobin Paradigm

Re: Good to remove all extension preferences on uninstall?

Unread post by New Tobin Paradigm » 2021-06-12, 03:19

Depends. Sometimes it is trivial just a pref or two I'd leave it but if it were like a dozen or more you could serialize it to json or something and shove it in a profile folder and just leave a lastVersion pref in there and then expand it back out if they reinstall it. Sort of what ABPrime does.

Really it is up to you but I can say with absolute certainly it is a solid.. Maybe.

Locked