User:Guycn2/UserInfoPopup
User Info Popup | |
---|---|
Description | Adds an icon at the top of user-related pages to view useful information about the user |
Author(s) | Guycn2 |
Status | Stable |
First released | May 25, 2023 |
Skins | Vector (2022), Vector legacy (2010), MinervaNeue, Monobook, Timeless |
Source |
This user script adds an i icon at the top of user-related pages, such as user pages, user talk pages, "Contributions" pages, etc.
The color of the i icon represents the amount of time passed since the user last edited on the wiki, which can give you an idea of whether the user is currently online, and whether he or she is still active on the site.
Hovering over the i icon reveals a popup with some basic information about the user: registration time, number of edits, time elapsed since last edit, user groups (rights), latest block time, as well as gender (if disclosed). Some of this information is also available for IP (unregistered) users.
Installation
[edit]On the English Wikipedia
[edit]To use this script on the English Wikipedia, add the following line to your local JS page:
importScript( 'User:Guycn2/UserInfoPopup.js' ); // Backlink: [[User:Guycn2/UserInfoPopup.js]]
On other wikis
[edit]To use this script globally (i.e. on all Wikimedia wikis), add the following line to your global JS page:
mw.loader.load( 'https://wiki.riteme.site/w/index.php?title=User:Guycn2/UserInfoPopup.js&action=raw&ctype=text/javascript' );
Localization to other languages
[edit]This script is operable on all MediaWiki projects, regardless of the site's language. It uses English text by default, and is currently available in Hebrew as well. Therefore, if your wiki has an interface language other than English or Hebrew, the script will still work there, albeit with English text.
Localizing this script to your language is very easy. All it takes is adding the appropriate text in your language to the script's i18n function. If you are interested in having the script's interface text translated to your language, please contact Guycn2.
Skin and platform support
[edit]The script is fully supported on all skins currently available on Wikimedia wikis. These include Vector (2022), Vector legacy (2010), MinervaNeue, Monobook, and Timeless.
It is also fully supported on the site's mobile interface.
The color of the i icon
[edit]The i icon is located at the top-right area of all user-related pages. The color of the icon dynamically changes, reflecting the editor's most recent edit time.
The i icon can appear in one of the following colors:
- (Green) – Indicates the user last edited less than 20 minutes ago.
- (Orange) – Indicates the user last edited more than 20 minutes ago, but less than 3 months ago.
- (Red) – Indicates the user last edited more than 3 months ago.
- (Grey) – Indicates the user has never edited, or last edit date is unknown (typically because all edits are on deleted pages).
Information displayed in the popup
[edit]Hover over the i icon to quickly view useful information related to the user.
The popup with the relevant information will open instantly as soon as you hover your mouse cursor over the i icon. When you move your mouse cursor out of the popup area, it will automatically close after approximately two seconds.
Tips:
- To close the popup immediately (without having to wait for two seconds), you can click anywhere on the page other than the popup area itself, or press the Esc key on your keyboard.
- If you need more time to read the information and do not want the popup to close automatically, you can keep your mouse cursor over the i icon or over the popup. Alternatively, you may click (rather than hover) the i icon or the popup. This will cause the popup to stay open until you manually close it, as described at the previous tip.
The following information is provided in the popup:
- Gender
If the editor chose to disclose their gender in their user preferences page, an appropriate gender symbol will appear in the popup.
indicates an editor who identifies as a female ("she/her"), and indicates an editor who identifies as a male ("he/his"). If no pronoun was selected by the editor (i.e., the default "unspecified" option is selected in their preferences), or if this is an unregistered editor, no gender symbol will appear.
- Joined
The date on which the user account was created. Not applicable for unregistered users.
- Edits
The total number of edits made by the user.[a] Provides a link to an external edit counter which shows detailed information and statistics about the user, such as the numbers of certain log actions performed by the user, distribution of edits by years and namespaces, and more.
- Last edited
The amount of time passed since the user made their latest edit. Displays "never" or "unknown" if the user has never edited, or had only edited pages that were subsequently deleted. Provides a link to the user's Contributions page where you can see further details about their recent edits.
- Groups
A comma-separated list of groups (rights) the user is a member of. Not applicable for unregistered users (who are not explicitly members of any group). Provides a link to Special:UserRights where you can see further details about the user's groups, as well as their user rights log. That page also allows editors with appropriate permissions to modify the groups the user is a member of. If the user is a member of any global groups, they will be listed too, and a link to the global rights log will be provided.
- Last blocked
The date on which the user was last blocked by an administrator. Displays "never" if the user has never been blocked, "currently blocked" if a full block is currently in effect, or "currently blocked (partially)" if a partial block (that is, a block that only applies to specific pages or namespaces) is currently in effect. Provides a link to the user's block log, where you can see further details about their block history. If a range block, a global block, or a global lock is currently in effect, information about these will also be shown, along with a link to the relevant log.
Example screenshots
[edit]See also
[edit]- User:Guycn2/UserInfoPopup.js – the script's source code
- User:Guycn2/UserInfoPopup.css – the script's style sheet
Notes
[edit]- ^ For technical reasons, the accessible information about the total number of edits made by an IP (unregistered) user is limited. Most users can retrieve up to 500 edits from the API, whereas users with the apihighlimits right (typically bots and administrators) can retrieve up to 5,000 edits. For this reason, if more than 500 or 5,000 edits were made by a specific IP, the popup displays "500+" or "5,000+" (depending on whether you have the apihighlimits right) rather than the accurate number. In practice, this is not a substantial limitation, since IP addresses are usually dynamic and therefore there aren't many IP addresses from which more than 500 (let alone 5,000) edits were made.
Note that you can still click the link provided in the popup to open an external edit counter, where the full number of edits should be displayed regardless of this limitation.