User:Suffusion of Yellow/batchtest-plus
Description | Adds an option to Special:AbuseFilter/test allowing testing of a pattern against past filter hits |
---|---|
Author(s) | Suffusion of Yellow |
Status | Experimental |
First released | June 10, 2019 |
Updated | November 23, 2022 |
Browsers | Tested in Firefox or Chromium. Requires async function support. |
Skins | All |
Source | User:Suffusion of Yellow/batchtest-plus.js |
Batch Test Plus adds an option to the abuse filter testing interface to check a pattern against old hits from any filter. It requires the same user rights as that interface. If you are not an administrator, edit filter manager, or edit filter helper, this script will do nothing.
To use, visit Special:AbuseFilter/test, and put any valid pattern in the main edit area. Optionally, fill in any of the "Changes by user", "Changes made after", "Changes made before", and "Changes made to page" fields.
You should see a new "Test against past hits" form at the bottom of the page. Put up to 50 filter numbers in the field (or leave it blank to get hits from all filters), and click the "Test" button to its right. Up to 100 hits from the filter(s) will be shown. Each hit will be marked by a symbol, until the check is actually performed, at which point it will be replaced with the old familiar or symbol. This will take a long time, as the MediaWiki software only allows checking one hit per API request.
On individual edit filter pages, e.g. Special:AbuseFilter/384, you should also see two new buttons next to the "Save filter" button. One button ("FP check") tests the updated filter against the log of a special filter capturing a random sample of non-autoconfirmed edits. The other button ("FN check") tests the updated filter against its own log.
Limitations
[edit]- The "Hide bot edits", and "Show changes that do not match the filter" options are ignored.
- If the "Action type" is set to anything other than "All actions", fewer than 100 hits may be tested.
Installation
[edit]Add the line {{subst:iusc|User:Suffusion of Yellow/batchtest-plus.js}}
to your common.js page.