BlockLookup is a script that adds a custom special page called Special:BlockLookup, which allows for looking up of block information. It provides the following information:
- The user's recent contributions
- The user's abuse log
- The user's block log
- The user's data (Registration, groups, etc.)
- The user's block information:
- Block ID
- Blocking admin
- Block length, and expiry
- Block target
The block data also has many tool links for the user/IP address, which allows for rapid processing of block appeals or determining sockpuppetry.
Installation
Usage
This script has 2 methods of inputs: Directly via the form, or via URL parameters. There are 6 form inputs:
- The block target, which can be an IP address (IPv6 and ranges are allowed), username, or a block ID (in the format of
#ID).- If there input is omitted, the script will fetch the most recently blocked user.
- The log display limit, which limits how many log entries may be displayed (Defaults to 15).
- The contributions namespace, which is a dropdown of all wiki namespaces.
- This input also comes with "Invert" and "Associated" checkboxes, which causes the selected namespace to be ignored and the talk page counted respectively.
- The contributions tag filter, which filters or specific tags.
- The abuse log page title (Only shows if you have permission to view abuse logs).
- The abuse log filter ID (Only shows if you have permission to view abuse logs).
| Name | Description | Default |
|---|---|---|
wpTarget
|
The target user/IP address/block ID to lookup. Accepts IPv6 and ranges for IP addresses.
|
(none) |
limit
|
The number of logs to limit to. | 15
|
namespace
|
The contributions namespace to select. This is a namespace number (For example, 828 for the Module namespace).
|
(none) |
nsInvert
|
A boolean parameter (Enter 1/0 for true/false) to make the contributions ignore the selected namespace. | (none) |
associated
|
A boolean parameter (Enter 1/0 for true/false) to make the contributions include the namespace's associated talk namespace. | (none) |
tagfilter
|
The tag to filter the contributions with. See Special:Tags for a list of possible values. | (none) |
wpSearchTitle
|
The abuse log title to search for. This will only do anything if you have permission to view abuse log title hits. | (none) |
wpSearchFilter
|
The abuse log filter ID search for. This will only do anything if you have permission to view abuse log title hits. | (none) |
Links
The data results have many helpful links. These range from global links (such as global nuke, and only if you have access to such tools), to IP tools. There are the following groups of links:
- IP tool links
- Global links
- Usual contributions links
- CC links
Extending
This script comes with 7 event handlers you can use to extend this script. Each event has specific data that is passed to it.
The class name for this script is BlockLookup, and is available globally.
To begin extending this script, you should first add an event listener to check if the script is loaded:
mw.hook('BlockLookup.loaded').add(function(BlockLookup) {
// You can now add event listeners using BlockLookup.on()
});
Events
These events can be listened on by using the on(<eventName>, <callback>, <?thisArg>) method, or by using mw.hook(). All hooks are prefixed with BlockLookup. Each event handler's this is set to the current script class.
| Name | Data | Description |
|---|---|---|
loaded
|
The script's main class. | The event for when the script is loaded. |
submit
|
The inputs provided to the form. | The event for when the form is submitted. |
load-start
|
(none) | The event for when the data loading starts. |
load-end
|
(none) | The event for when the data loading ends. |
result-success
|
The data block data fetched. | The event for when the data is successfully retrieved. |
result-reject
|
The failure message. | The event for when the data failed to be retrieved. |
input-change
|
The inputs provided to the form. | The event for when the form's input change. |
Each event is passed a custom event object:
| Name | Type | Description |
|---|---|---|
data
|
* | The data emitted by the event. |
timestamp
|
Number | The timestamp of the event. |
type
|
String | The name of the current event. |
inputs
|
Object | The current inputs of the form. |
pending
|
Boolean | Whether the script is pending data rendering. |