dev

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 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:


Available URL parameters
Name Description Default
wpTarget The target user/IP address/block ID to lookup. Accepts IPv6 and ranges for IP addresses.
  • You can also visit the URL Special:BlockLookup/<username/block ID/IP address> as a shortcut to this URL parameter.
(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:

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.

List of events
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:

Event object properties
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.
Text above can be found here (edit)