MediaWiki:Gadget-LogoVariants.js

(function {	const namespaceId = mw.config.get("wgNamespaceNumber");	if (namespaceId != 0) {		return;	}	const pageId = mw.config.get('wgArticleId');	new mw.Api.get({ action: 'cargoquery', format: 'json', limit: '1', tables: 'Appearances', fields: 'main', where: "_pageId = '"+ pageId +"'" }).done(function(rows) { const mainAppearances = rows[0].title.main.split(/\s*,\s*/); if (mainAppearances.length == 1) { const game = mainAppearances[0].toLowerCase; $("body").addClass("game-page--"+game); }	}); });