They shouldn't be public. How can they be private?
Description
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Declined | DannyS712 | T245326 110: Store user preferences as a global preference | |||
Resolved | DannyS712 | T238299 77: Investigate not making settings public |
Event Timeline
Cookies can be used to store settings and they are not public. But the user will have to update their settings again if cookies expire or they clear cookies in their browsers.
Alternative: Toolforge can be used to store user preferences, I guess. SWViewer does the same.
Thats because SWViewer is hosted on toolforge - this is a user script, so I don't think I can do that
mw.Api.plugin.options, and mw.user.options.get to get the preference. This uses https://en.wikipedia.org/w/api.php?action=help&modules=options. Note for scripts the option key be prefixed with userjs-. I think this might stored on a per-wiki basis, though, so you might have to force users to go to meta to use the global watchlist so the preferences are saved in one place.
Thanks for the suggestion of using mw.user.options.get - storing this as user options would be great. While using the API plugin would be simpler, I want the watchlist to be globally accessible - the global preferences API, however, does something similar, and globally. Unless I come up with something better:
- Store preferences via GlobalPreferences API
- Retrieve preferences via mw.user.options.get
This has the added bonus of allowing settings to be configured on any site, rather than just metawiki.
I tried testing this, and found out that I cannot delete my testing preferences - T238487: GlobalPreferences: Unable to delete `userjs-` option
Haven't found a better way to do this, so going to close this as resolved;
Investigation results: settings can be stored privately as a GlobalPreference
So can you make the script store preferences privately as a global preference? Or is it blocked on T238487?
I'd like to wait until T238487 is resolved, since there are still some issues with user defined global preferences
@DannyS712 It looks like it is still blocked on T238487. Workaround: How about creating a local preference option on meta and querying the meta API to retrieve the preferences?
Not blocked, just haven't had time; pretty burned out, and there are some other big projects I'm coding. Hopefully I'll get the grant and be able to dedicate time to this