User:1Veertje/Tips/button scripts
< User:1Veertje | Tips
For adding reason-for-change buttons to the classic upload form, ad this JavaScript to your common.js:
//add buttons to the classic upload form
if (wgPageName == 'Special:Upload'){
$('.mw-htmlform-field-HTMLTextField').after('<tr><td></td><td>'+
'<button type="button" onclick="$(\'#wpUploadDescription\').val(\'Higher resolution acquired using the [[Dememorixer]]\')">Dememorixer</button>'+
'<button type="button" onclick="$(\'#wpUploadDescription\').val(\'Higher resolution\')">Higher resolution</button>'+
'<button type="button" onclick="$(\'#wpUploadDescription\').val(\'=={{int:filedesc}}==\\n{{Artwork\\n|wikidata=\\n|title={{en|1= }}\\n|date=\\n|medium = \\n|dimensions = \\n|institution=\\n|source=\\n|author=\\n|notes=\\n|permission=\\n|other versions=\\n}}\')">Artwork</button>'+
'</td></tr>');
}