|
|
Line 44: |
Line 44: |
| $(this).text(mw.config.get('wgUserName')); | | $(this).text(mw.config.get('wgUserName')); |
| }); | | }); |
| });
| |
|
| |
| /* Automatically add aboutfile template to file upload description */
| |
| $(function() {
| |
| if (mw.config.get('wgCanonicalSpecialPageName') === 'Upload' && !document.getElementById('wpForReUpload') && !document.getElementsByClassName('mw-destfile-warning')[0] && !document.getElementsByClassName('error')[0]) {
| |
| uploadDescription = document.getElementById('wpUploadDescription');
| |
| var doubleBracket = '{' + '{';
| |
| uploadDescription.value = doubleBracket + 'aboutfile\n|description=\n|purpose=\n|game=\n|source=\n}}';
| |
| }
| |
| }); | | }); |
|
| |
|