User:Dragoniez/InvestigateHelper

InvestigateHelper is a CheckUser script designed to facilitate the use of Special:Investigate. It features:

  • An Investigate table parser that generates a list of retrieved usernames and IPs with useful tool links to check previous user activity.
  • Automatic common IP range calculations to easily identify candidates for blocking.
  • An on-page mass block interface that is fully compatible with multiblocks.

Installation

edit

Add the following to Special:MyPage/common.js on the project(s) where you have CheckUser access. If you have access on multiple projects, it can also be added to Special:MyPage/global.js. (source code)

if (mw.config.get('wgCanonicalSpecialPageName') === 'Investigate' && mw.config.get('wgTitle').includes('/')) {
	mw.loader.load("//meta.wikimedia.org/w/index.php?title=User:Dragoniez/InvestigateHelper.js&action=raw&ctype=text/javascript");
}

Usage

edit

When investigating users and/or IPs, InvestigateHelper automatically parses the Investigate table, generates a list of retrieved usernames and IPs with useful tool links, and calculates common IP ranges from the parsed IP addresses.

Index Item Details
1 user selector A checkbox for this username or IP address. When (un)checked, it is reflected in the username field of the "Block user" tab.
2 list toggle A button to expand/collapse detailed information on this username or IP address.
3 date range The date range during which the user/IP was active. Parsed directly from the Investigate table.
4 IP range CIDR allocation details, present if the listed entry is a CIDR address.
5 associated usernames A list of usernames and IP addresses that are associated with the listed user/IP.
6 selected user list A list of selected users/IPs. This field is updated when any checkbox is (un)checked, and updates here are also reflected in the checkboxes.
Clicking on "Investigate" opens another Special:Investigate with the selected users/IPs.
7 block button A button to perform a mass block on the selected users/IPs. Clicking this button opens a confirmation dialog.
8 block targets (new) For targets not currently blocked, the dialog shows a list of usernames with checkboxes. Uncheck any box to exclude that user/IP before pressing "Submit".
9 block targets (modify) For targets already blocked, the dialog lists active blocks and lets the initiator add a new block, modify an existing block, or lift a block.
10 unblock reason When lifting blocks, a textbox is provided to enter an unblock reason, which will be used for any unblocks performed.
11 active blocks Check or uncheck boxes to choose whether to add a new block, modify an existing block, or lift an existing block.
12 traverser If the Investigate table is paginated, a "traverser" button is generated. Clicking it automatically collects CheckUser data from all other pages and updates the lists accordingly.

Language support

edit

Most interface messages used by InvestigateHelper are reused from MediaWiki. However, some messages are defined specifically for this script. If you wish to localize them, please see the list below and share your translations on the talk page. More detailed information about these messages can be found here.

Translations

{
	"investigatehelper-traverser-button": "Collect data from other tabs",
	"investigatehelper-traverser-running-main": "Collecting data",
	"investigatehelper-traverser-running-counter": "Traversed pages:",
	"investigatehelper-traverser-notice": "CheckUser data has been collected from other Special:Investigate tabs. <b>The collected data will be lost if you refresh or leave this page</b>, because InvestigateHelper does not cache sensitive data for security reasons. To navigate to other tabs on this special page, it is recommended that you open them in a new tab or window to preserve the current page.<br>In the lists below, usernames collected from other tabs are highlighted in light pink.",
	"investigatehelper-traverser-notice-http": "<b>The data may be incomplete because the process encountered an HTTP request failure.</b>",
	"investigatehelper-traverser-notice-aborted": "<b>The data may be incomplete because the process was aborted before completion.</b>",
	"investigatehelper-traverser-complete": "CheckUser data has been collected from other tabs.",
	"investigatehelper-dialog-button-expand": "Expand",
	"investigatehelper-dialog-button-shrink": "Shrink",
	"investigatehelper-dialog-unblockreason": "Reason for lifting any blocks:",
	"investigatehelper-dialog-unblockreason-default": "Remove duplicate block",
	"investigatehelper-dialog-blocktarget-contains": "Contains: $1",
	"investigatehelper-dialog-blocktarget-containedin": "Contained in: $1",
	"investigatehelper-dialog-blocktarget-none": "No block targets have been selected.",
	"investigatehelper-dialog-blocktarget-unblockonly": "This will only <b>unblock</b> the targets. Do you want to continue?",
	"investigatehelper-dialog-blocktarget-mixed": "You are about to block $1 with the same reason at the same time, based on CheckUser data.$2<br>Please double-check the following in accordance with the [$3 Non-Disclosure Agreement]:<ul><li>The IP addresses of registered users should not be disclosed.</li><li>Temporary accounts should not be associated with registered accounts based on evidence restricted to CheckUsers ([$4 details]).</li></ul><br>Are you sure you want to continue?",
	"investigatehelper-dialog-blocktarget-user": "registered accounts",
	"investigatehelper-dialog-blocktarget-temp": "temporary accounts",
	"investigatehelper-dialog-blocktarget-ip": "IP addresses",
	"investigatehelper-dialog-blocktarget-processed": "Processed $1 {{PLURAL:$1|request|requests}}.<ul><li>Success: $2</li><li>Failure: $3</li></ul>"
}