User:Daniel Quinlan/Scripts/SockDecay
From Wikipedia, the free encyclopedia
SockDecay adds a compact color-coded activity indicator for users on sockpuppet-related pages. By querying multiple sources, it highlights which accounts are still active and worth CheckUser attention, and which are likely inactive, making sockpuppet investigations faster and more intuitive.
| Description | Displays the most recent activity for users listed on sockpuppet-related pages. |
|---|---|
| Author | Daniel Quinlan |
| Status | Beta |
| Updated | 21 October 2025 |
| Browsers | Firefox, Safari, Chrome |
| Skins | Vector 2022, Vector, Minerva, Monobook, Timeless |
| Source | SockDecay.js |
Features
- Unified solution: Supports sockpuppet investigations case pages and sockpuppet category pages for all users, plus suggested investigations pages for checkusers.
- Comprehensive activity checks: queries account registrations, user contributions, abuse filter logs, and deleted revisions (if authorized), and optionally checks the account creation log to show the creator if different.
- Simple activity classes: classifies users as fresh, warning, or stale.
- User-friendly controls: manage activation, processing behavior, and display style with a built-in options dialog.
- IP address and IP range support: handles both individual IP addresses and IP ranges.
- Efficient processing: Processes a configurable number of users per page in batches for speed, avoids overloading the system, and skips unnecessary requests.
Usage
SockDecay runs automatically on sockpuppet investigation pages, category pages, and suggested investigations pages (checkusers only), adding color-coded activity indicators after usernames:
- The most recent activity shown (registration, edit, abuse log, or deleted revisions) is taken from all available sources. By default, processing stops early when fresh activity is found to improve efficiency, but this behavior can be changed in the options. If no edits or abuse logs are found, only the creation date will be shown.
- If creation log checks are enabled, the account creator is displayed with the creation date when it differs from the account itself. Both the creation date and creator username link to their respective log entry and user page.
- Underlined activity indicators can be clicked to perform additional processing: overlimit users (dashed underlines with muted coloring) are checked normally, and incomplete users (dotted underlines with normal coloring) are checked fully.
- The activity indicator for the oldest registered account (by user ID) is shown in bold, and the indicator for the freshest user (any type) is shown in italics.
Activity
| Activity | Meaning | Example |
|---|---|---|
| fresh | recent activity | created 2024-12-22, edited 2026-02-17 |
| warning | within the warning window before the 90-day threshold | created 2024-05-17, edited 2025-12-07 |
| stale | 90+ days since last visible activity | created 2019-08-24, edited 2024-09-19 |
| default | missing or no timestamps | missing |
Status
| Status | Meaning | Example |
|---|---|---|
| processing | checks ongoing (subtle gray background) | created 2026-02-28, edited 2025-03-01 |
| overlimit | registration only (user limit reached; click to process) | created 2025-09-08 |
| incomplete | partially processed (fresh activity; click to process fully) | created 2025-11-22, edited 2026-02-24 |
Configuration
Options dialog
SockDecay adds a Sock decay options link to the tools menu, providing a user-friendly interface to control these settings:
Activation
- Activate automatically on investigation pages enables automatic processing for SPI case pages. When disabled, you can activate the script by clicking the Sock decay link in the tools menu.
- Activate automatically on category pages enables automatic processing for sockpuppet category pages. When disabled, you can activate the script by clicking the Sock decay link in the tools menu.
Processing
- Maximum users to process initially limits the number of recent users automatically processed when the page loads. Additional users can always be scanned manually by clicking activity indicators marked as overlimit.
- Warning period in days sets the number of days before an account is considered stale when users are marked as nearing inactivity. Adjusting this affects how soon before staleness accounts enter the warning status.
- Check creation log for account creator links the creation log and the account creator if different from the account itself, providing additional context.
- Disable early exit so full activity checks are always done forces the script to always check all sources instead of stopping when fresh activity is found, providing more complete information at the cost of additional API requests.
Display
- Compact display on investigation pages reduces visible information to days since last activity with more details in a tooltip.
- Compact display on category pages reduces visible information to days since last activity with more details in a tooltip.
Buttons
- ☒ and the escape key closes the options dialog without saving changes.
- Save saves all current options to your user preferences.
- Load defaults restores all options to their default settings. Note that clicking this does not automatically save the settings.
Custom styling
Advanced users can customize the appearance of SockDecay activity indicators using CSS. Each status type has its own class. See the script for the default CSS. Here's an example showing how to add labels for the oldest and freshest users:
/* add labels for oldest and freshest users */
.sockdecay-oldest::after { content: ' — oldest'; }
.sockdecay-freshest::after { content: ' — freshest\u200A'; }
Installation
To install the SockDecay script, follow these steps:
- 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.
- 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/SockDecay.js}}
Notes
- Deleted revision checks are only performed for administrators and other authorized users.
- Processing many users or enabling exhaustive checks generates more API requests and may take longer. The default settings favor speed, but you can adjust options to suit your needs.
- Legacy accounts without registration data are marked with a "legacy" creation date.
Credit
This script is based on the idea behind User:Writ Keeper/Scripts/cuStaleness.js by Writ Keeper and Tamzin. Thanks to everyone who tested and provided feedback.