Feature summary (what you would like to be able to do and where):
Currently, Cat-a-lot provides two ways to save preferences: either temporarily, in the memory, or publicly, in the user’s common.js file. I suggest adding a third one (or maybe even replacing the latter): saving privately, in the user’s preferences. SettingsManager already supports this, via its method mw.libs.settingsManager.switchGadgetPref.
Use case(s) (list the steps that you performed to discover that problem, and describe the actual underlying problem which you want to solve. Do not describe only a solution):
Persisting preferences without making them public.
Benefits (why should this be implemented?):
- More privacy. Just like it’s not public what skin one uses or how large their watchlist is by default, it shouldn’t be public either what Cat-a-lot preferences one has.
- More reliable. The common.js solution relies on specially-crafted comments, and since the user may edit that page (to do unrelated things), they may screw up the syntax. In contrast, gadget preferences are only editable through the API, and belong only to Cat-a-lot, so it’s unlikely that people touch them in ways they shouldn’t.