When one imports a backup of their preferences, any keys in the backup get set, but any keys not in the backup do not get removed, as one might expect. (adding await browser.storage.local.clear(); would implement this behavior.)
Of course, there are probably situations where one might want the current, merge-my-import-into-my-current-preferences behavior, honestly; one could argue that this is only sort of a bug. It would probably be way too confusing to implement two different restore buttons that allow the user to pick either behavior and that only appear in the case where the pasted backup does not contain some of the keys which are currently set, though it's not like it's hard.
Platform
MacOS 13.5 arm64
Browser
Chrome 115.0.5790.170
Addon version
master
Details
https://github.com/AprilSylph/XKit-Rewritten/blob/248912f7c22e5c129a52563acde76a7b4e65b620/src/browser_action/render_backup.js#L57-L58
When one imports a backup of their preferences, any keys in the backup get set, but any keys not in the backup do not get removed, as one might expect. (adding
await browser.storage.local.clear();
would implement this behavior.)Of course, there are probably situations where one might want the current, merge-my-import-into-my-current-preferences behavior, honestly; one could argue that this is only sort of a bug. It would probably be way too confusing to implement two different restore buttons that allow the user to pick either behavior and that only appear in the case where the pasted backup does not contain some of the keys which are currently set, though it's not like it's hard.