MediaWiki:Common.js

/* Any JavaScript here will be loaded for all users on every page load. */

function createArtistString(artists, featured = []) { var artistStr = ''; if (artists.length == 1) { artistStr += +artists[0]+; } else if (artists.length == 2) { artistStr += +artists.join(' & ')+; } else { var last_artist = artists.pop; artistStr += +artists.join(', ')+' & [[' + last_artist+;	}	if (featured.length > 0) {		artistStr += createArtistString(featured);	}	return artistStr }