User:Alexis Jazz/Remove summary header in special upload.js

// //Hopefully prevent duplicate summary headers when using Special:Upload function removesummaryheader { document.getElementById('wpUploadDescription').value = document.getElementById('wpUploadDescription').value.replace( /\s*==\s*\{\{int:filedesc\}\}\s*==\s*\n/g, ).replace( /\s*==\s*Summary\s*==\s*\n/g, ); } if ( mw.config.get('wgNamespaceNumber') == -1 && mw.config.get('wgPageName') == 'Special:Upload' ) { document.getElementById('wpUploadDescription').onchange = removesummaryheader; } //