UserStatus is a script that displays a user's status on their masthead. It could be useful for community-based wikis. It is also configurable.
Installation
Changing your status
Your status is stored at User:USERNAME/status on your wiki. You can either:
- Type in a status and publish it. There should be no other page content. OR
- Use the dropdown menu which appears on your masthead under your bio/info (legacy) or next to the "Edit Profile" button (UCP).
The available statuses are:
- online
- away
- dnd
- offline
Please edit only your own status. A warning will display if you attempt to edit others' statuses (legacy).
Configuration
Settings are stored in the window.UserStatusSettings
object. It can go into both personal and site-wide JS.
0
means off/false and 1
on/true.
Variable | Description | Available values | Default value | Notes |
---|---|---|---|---|
colorBlindMode
|
Colorblind mode; adds icons to status indicators | 0 /1
|
1
|
|
lightTheme
|
Light themed icons for colorblind mode | 0 /1
|
0
|
Requires colorBlindMode .
|
statusIndicator
|
Display the circle next to a user's avatar | 0 /1
|
1
|
Not recommended if combined with MastheadRightsBadge. |
online , away , dnd , offline
|
Change the color of the status indicator | string, any hexadecimal or color name | #Colors | String value (in between quotation marks), set each individually, unknown statuses are set to offline color |
An example configuration would be:
window.UserStatusSettings = {
colorBlindMode: 1,
lightTheme: 1,
statusIndicator: 0,
online: '#0078ff',
away: '#cc7',
dnd: 'crimson',
offline: 'darkgray',
};
Customization
Various elements can be customized via CSS:
.status-indicator
- the circle next to a user's avatar.status-indicator-online
- the online status indicator.status-indicator-away
- the idle status indicator.status-indicator-dnd
- the do not disturb status indicator.status-indicator-offline
- the offline status indicator
.status-masthead
- the text on the right side of the masthead (legacy)/the text next to one's editcount (UCP).status-masthead-online
- text for online users.status-masthead-away
- text for idle users.status-masthead-dnd
- text for do not disturb users.status-masthead-offline
- text for offline users
.si-is-colorblind
- colorblind status indicators.si-is-blocked
- status indicators for blocked users.status-indicator-blocked
- the blocked status indicator.status-masthead-blocked
- text for blocked users
Colors
- Online
#43b581
for online users $online - Idle
#faa61a
for idle users $away - Do Not Disturb
#f04747
for users on Do Not Disturb $dnd - Offline/Unknown
#747f8d
for offline/unknown users $offline - Blocked
#8f0000
for blocked users $blocked
Notes
- It is recommended to use the
statusIndicator
configuration variable with MastheadRightsBadge to avoid unnecessary clutter around a user's avatar.
Planned Features
- Fix UCP masthead elements disappearing after editing masthead info
- Fix UCP dropdown menu
- Display notification when editing others' statuses (on UCP)
- Fully change status to blocked when a user is blocked (WIP)
- Light themed blocked icon
- /banner.js (UCP?)
- "Reload profile" link for /banner.js
- User-friendly settings page (Documentation is hopefully self-explanatory enough?)
Built-in customizable status colorsDropdown menu option to quickly switch statusesSmoother animation for status menui18n-js implementationAdd option to remove.status-indicator
via configMerge main script with subpages
Text above can be found here (edit)