_ _    _ _____  ___   __                       
 __      _(_) | _(_)___ / ( _ ) / /_   ___ ___  _ __ ___  
 \ \ /\ / / | |/ / | |_ \ / _ \| '_ \ / __/ _ \| '_ ` _ \ 
  \ V  V /| |   <| |___) | (_) | (_) | (_| (_) | | | | | |
   \_/\_/ |_|_|\_\_|____/ \___/ \___(_)___\___/|_| |_| |_|

User:Suffusion of Yellow/filterTest.js

In this article, we will delve into the fascinating world of User:Suffusion of Yellow/filterTest.js, exploring its many facets and relevance in the current environment. From its origins to its impact on contemporary society, we will analyze each relevant aspect in detail, offering a broad and complete vision of this topic. User:Suffusion of Yellow/filterTest.js has been the subject of interest and debate in various areas, and through this research, we will seek to shed light on its main components and implications. Join us on this exciting journey, to discover everything that User:Suffusion of Yellow/filterTest.js has to offer us and its role in today's world.
/*
 * filterTest: Adds a button at Special:AbuseFilter/nnn pages to open
 * Special:AbuseFilter/test with what's currently in the _edit window_.
 * The built-in link only tests the pattern currently in the _database_,
 * which is probably not what you want.
 */
//<nowiki>
(function() {
	/* globals $, mw, OO */
	'use strict';

	function openTest() {
		let id = mw.config.get('wgPageName').match(/\d+$/);
		let suffix = id ? "/" + id : "";

        let $form = $('<form></form>', {
            style: "display: none;",
            action: "https://wiki386.com/en/Special:AbuseFilter/test" + suffix,
            target: "_blank",
            method: "POST"
        });

        $('<input>', {
			type: 'hidden',
            name: 'wpFilterRules',
            value: $('#wpFilterRules').val()
        }).appendTo($form);

        $('<input>', {
			type: 'hidden',
            name: 'wpShowNegative',
            value: '1'
        }).appendTo($form);

        $form.appendTo('body').submit().remove();
	}

	function addButtons() {
		if (!$("#mw-abusefilter-editing-form").length)
			return;

		let testButton = new OO.ui.ButtonWidget({
			id: "efb-test-changes",
			label: "Test changes",
			title: "Test the modified pattern against recent changes",
		});

		testButton.on('click', openTest);

		$('#mw-abusefilter-syntaxcheck, #efb-show-changes')
			.last().after(testButton.$element);

		/* Prevent buttons from shifting when "Check syntax" is clicked */
		mw.util.addCSS(".mw-spinner { display: none; } ");
	}

	if (mw.config.get('wgCanonicalSpecialPageName') == "AbuseFilter")
		$.when($.ready,
			   mw.loader.using(['mediawiki.util',
								'oojs-ui',
							   ])).then(addButtons);
})();
//</nowiki>