MediaWiki:Gadget-CleanDeleteReasons.js: Difference between revisions
Jump to navigation
Jump to search
Want an adless experience? Log in or Create an account.
(Created page) |
m (update deprecated wg variables to mw.config) |
||
Line 1: | Line 1: | ||
$( function() { | $( function() { | ||
if (wgAction == "delete") { | if (mw.config.get('wgAction') == "delete") { | ||
var wpReason = document.getElementById("wpReason"); | var wpReason = document.getElementById("wpReason"); | ||
if (!wpReason) return; | if (!wpReason) return; |
Latest revision as of 04:47, March 19, 2017
$( function() { if (mw.config.get('wgAction') == "delete") { var wpReason = document.getElementById("wpReason"); if (!wpReason) return; var regexp = /(content was|page was empty|content before blanking was)/i; if (regexp.test(wpReason.value)){ wpReason.value = ""; } } });