Wikipedia:WikiDefender

WikiDefender.js
WikiDefender in light mode
DescriptionDiff viewer for reverting vandalism
AuthorUser:Gommeh
UpdatedNovember 20, 2026
(3 days ago)
 (2026-11-20)
SourceUser:Gommeh/Scripts/WikiDefender.js
WikiDefender in dark mode

WikiDefender is a web-based counter-vandalism tool. It loads edits made to Wikipedia in real-time, allowing for unconstructive edits to be quickly reverted. It is a fork of AntiVandal. WikiDefender is integrated with MediaWiki's ORES service to show the highest-priority edits first. It has many of the same features as Huggle, with the goal of being more intuitive, modern, and easy to install. The rollback permission is required to use WikiDefender.

The current version of WikiDefender is 1.1. It rewrites much of the script and adds a number of new features, including mobile phone support.

Requirements

Due to the ability of the script to revert edits extremely quickly, it is required for the user to have the rollback right. If you do not have the rollback right, you can make a request at the permissions page (eligible users must have at least 200 mainspace edits and no history of edit warring).

Installation

WikiDefender as seen on mobile

Method 1

Go to Preferences → Gadgets → Advanced, check "Install scripts without having to manually edit JavaScript files", and save. Reload this page, and there should be a button which says "install".

Method 2

Add {{subst:lusc|User:Gommeh/Scripts/WikiDefender.js}} to your common.js.

Usage

After the script is installed, beside your preferences button, there will now be a link which says " WikiDefender" or visit the direct link. Clicking this will activate the script.

Controls

AntiVandal's controls are completely customizable, but these are the defaults:

  • Q rolls back the current edit, warns the user who made it with escalating warnings, and reports to AIV if they are at a final warning.
  • Space or right arrow goes to the next edit.
  • left arrow goes to the previous edit.
  • H opens up the page history of the selected edit.
  • C opens the contributions of the selected user.

Developing

The source code for WikiDefender can be found at User:Gommeh/Scripts/BetterAntiVandal.js. Contributions or suggestions are welcome! Please leave any feedback on Gommeh's talk page.