User:Daniel Quinlan/Scripts/FilterDiff

From Wikipedia, the free encyclopedia

The FilterDiff script improves the readability of Special:AbuseFilter version diffs.

StatusBeta
Updated16 October 2025
Quick facts Author, Status ...
FilterDiff
AuthorDaniel Quinlan
StatusBeta
Updated16 October 2025
SourceFilterDiff.js
Close

Features

  • 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

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

To install the FilterDiff.js script, follow these steps:

  1. 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.
  2. 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

None.

Related Articles

Wikiwand AI