User:Guycn2/UserInfoPopup

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.

On the English Wikipedia
To use this script on the English Wikipedia, add the following line to your local JS page:

On other wikis
To use this script globally (i.e. on all Wikimedia wikis), add the following line to your global JS page:

Localization to other languages
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
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
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:
 * Information green.svg (Green) – Indicates the user last edited less than 20 minutes ago.
 * Information orange.svg (Orange) – Indicates the user last edited more than 20 minutes ago, but less than 3 months ago.
 * Information red.svg (Red) – Indicates the user last edited more than 3 months ago.
 * Information grey.svg (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
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: 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. The date on which the user account was created. Not applicable for unregistered users. The total number of edits made by the user. 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. 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. 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. 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.
 * Gender
 * Joined
 * Edits
 * Last edited
 * Groups
 * Last blocked