User:Daniel Quinlan/Scripts/SockTags

SockTags
DescriptionEnhances sockpuppet investigation pages with visual tags.
AuthorDaniel Quinlan
StatusBeta
Updated22 November 2025
BrowsersFirefox, Safari, Chrome
SkinsVector
SourceSockTags.js

The SockTags script enhances Wikipedia:Sockpuppet investigations pages by displaying visual indicators next to usernames based on user page sockpuppet tagging.

Features

edit
  • Visual tags: User tags showing "M" (master) or "P" (puppet) with status color codes and tooltips.
  • Fast and efficient: Skips IPs, avoids repeated queries, and tags users concurrently.
  • Comprehensive display: Shows up to two tags per user with status and master information in tooltips, including alternate masters.
  • Template redirects: Resolves all template redirects like {{sockmaster}}{{sockpuppeteer}} with local caching of redirects.
  • Customizable styling: Uses CSS classes for easy customization of tags.

Installation

edit

To install the SockTags script, follow these steps:

  1. In your preferences, go to Preferences Gadgets. At the bottom of the "Advanced" section, click the "Install scripts without having to manually edit JavaScript files (documentation)" checkbox, then click the "Save" button.
  2. Return to this page and click the blue "Install" button.

Alternatively, you can manually install it by adding the following code to your common.js file:

{{subst:iusc|User:Daniel Quinlan/Scripts/SockTags.js}}

Usage

edit

The script automatically runs on Wikipedia:Sockpuppet investigations pages and adds tags based on user page sockpuppet tagging. Hover over any tag to see the account status and the master if specified. If an alternate master has been listed, both primary and alternate information will be displayed.

Default tags

edit

Tagged users are marked with a monospace square: "M" for master and "P" for puppet, with background colors and title tooltips indicating the status.

StatusExample
BannedM
BlockedP
ConfirmedP
ProvenP
SuspectedP
UnknownP

Custom tags

edit

You can customize the user tags in your common.css page or a skin-specific stylesheet such as vector.css. Here's an example of styling the confirmed status with a green background:

.socktag-status-confirmed {
	background-color: green !important;
}

Credits

edit

This script is based on User:RoySmith/tag-check.js although it has been rewritten, so any issues should be attributed to me.