MediaWiki:RefToolbar.js: Difference between revisions
Content deleted Content added
switching to protocol-relative URL |
no one cba to review this, so just going to implement this - fix for DOI autofill when the full date isn't available |
||
Line 514:
}
if (type === 'pmid' || type === 'doi') {
if (type === 'doi' && data.fulldate) {
var DT = new Date(data.date);
$('.'+cl+'date').val(CiteTB.formatDate(DT));
} else if (type === 'doi' && !data.fulldate) {
if (data.month) { // lookup.php sets month to false if it isn't provided
$('.'+cl+'month').val( CiteTB.getOption('months')[parseInt(data.month)] );
}
$('.'+cl+'year').val(data.year);
} else {
$('.'+cl+'date').val(data.date);
|