User:Daniel Quinlan/Scripts/FilterDiff
Appearance
Author(s) | Daniel Quinlan |
---|---|
Status | Beta |
Updated | 21 April 2025 |
Source | FilterDiff.js |
The FilterDiff script improves the readability of Special:AbuseFilter version diffs.
Features
[edit]- Collapses unmodified lines that are far from changes, similar to the context or unified diff formats.
- Provides toggle buttons to expand and collapse individual diff sections.
- Removes unnecessary item labels to reduce clutter and maximize diff space.
- Adds line numbers for clarity when some unmodified lines are hidden.
Usage
[edit]When a diff section is collapsible, a toggle button is displayed on the right side of its header to expand or collapse the section.
Installation
[edit]To install the FilterDiff.js 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/FilterDiff.js}}
Configuration
[edit]None.