User:Daniel Quinlan/Scripts/RangeHelper
{{Infobox user script
| name = RangeHelper
| author = {{u|Daniel Quinlan}}
| updated = {{#time:j F Y|{{REVISIONTIMESTAMP|User:Daniel Quinlan/Scripts/RangeHelper.js}}}}
| status = Beta
| source = RangeHelper.js
}}
The RangeHelper script streamlines interacting with IP addresses and IP ranges.
Features
- View the complete block history for any IP address or IP range, including all encompassing range blocks.
- Adds several quick navigation links for IP ranges.
- Calculate the smallest CIDR range to cover multiple IPs by selecting IP addresses on the contributions page for any IP range or using a standalone calculator.
- Displays a synthetic user talk page for IP ranges by including recent talk pages for individual IPs within the range.
Usage
= Contributions listings for IPs and IP ranges =
- On individual IP contributions pages, adds a link to a synthetic talk page for an IP range (/24 for IPv4 and /64 for IPv6). When viewing contributions for an IP range, a link to a synthetic talk page for the current range is provided.
- Inserts a (ranges) link next to block log to show the full history of blocks and range blocks affecting the IP or IP range.
- Inserts links for several useful IP ranges (e.g., /16 and /24 when viewing a single IPv4 address).
- When viewing an IP range, a Range selector tools link allows selecting multiple IP addresses to calculate the common range. A Range calculator tools link to a standalone IP range calculator is also provided.
= Special:Log/block =
- When viewing the block log for an IP or range, a Find range blocks link is added (similar to the (ranges) link mentioned above).
= Range calculator =
- Special:BlankPage/RangeCalculator (only available after installation) is the standalone tool to enter IP addresses and calculate the smallest covering range.
= Synthetic user talk pages for IP ranges =
The script creates synthetic user talk pages for IP ranges. These pages aggregate relevant recent discussions for a range of IPs. Any edits or additions should still be made on the user talk page for an individual IP.
Installation
To install the RangeHelper.js script, follow these steps: {{Ordered list|In your preferences, go to {{myprefs|Gadgets}}. At the bottom of the "Advanced" section, click the "{{delink|{{int:Gadget-script-installer}}}}" 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/RangeHelper.js}}
Configuration
None.
Notes
- Range queries and calculations are limited to the maximum sizes for IPv4 and IPv6 blocks. Separate calculations are required for mixes of IPv4 and IPv6 addresses and excessively broad ranges.
- When viewing range blocks, blocks smaller than the current range (with larger netmask numbers, such as individual addresses) are not displayed. For example, if you're viewing range blocks for a /48, blocks for /64 ranges or individual IPv6 addresses within the range won't be shown.
- Large range blocks can affect many users and should be used with caution.