MediaWiki:BackendInformation.js

function parseHttpHeaders(httpHeaders) { return httpHeaders.split("\n").map(function (x) {		return x.split(/: */, 2);	}).filter(function (x) {		return x[0];	}).reduce(function (ac, x) {		ac[x[0]] = x[1];		return ac;	}, {}); }

var xhr = new XMLHttpRequest; xhr.open('HEAD', document.location); xhr.send;

xhr.onload = function { var headers = parseHttpHeaders(xhr.getAllResponseHeaders), respTime = mw.config.get('wgBackendResponseTime'), backend = 'PHP7', server = mw.config.get('wgHostname'), cp = ( headers['x-served-by'] ? headers['x-served-by'] :  ).replace(/.miraheze.org|^mw[0-9]+|\s|,/g, ), dbname = mw.config.get('wgDBname'), info = respTime.toString + 'ms (' + backend + ' via ' + dbname + '@' + server + ' / ' + ( cp ? ' / ' + cp : '' ) + ')'; if (mw.config.get('skin') === 'cosmos') { $('').html(info).appendTo('#p-tb ul'); } else { $('').html(info).prependTo('#p-personal ul'); } }