MediaWiki:Gadget-CleanDeleteReasons.js

//Written and maintained by User:Mike.lifeguard /*global jQuery:false, mw:false*/ var deletemods = function { 'use strict'; if (mw.config.get('wgAction') === "delete") { var wpReason = document.getElementById("wpReason"); var field = wpReason; if (!wpReason) { return; }		var input = wpReason.querySelectorAll("input")[0]; if (input) { field = input; }		var regexp = /(?:content was|page was empty|content before blanking was)/i; if (regexp.test(field.value)){ field.value = ""; }	} }; jQuery(document).ready(deletemods);