User:Universal Omega/common.js

// mw.loader.load('//commons.wikimedia.org/w/index.php?title=User:Jack_who_built_the_house/convenientDiscussions.js&action=raw&ctype=text/javascript');

mw.loader.load('//en.wikipedia.org/w/index.php?title=User:Joeytje50/JWB.js/load.js&action=raw&ctype=text/javascript'); mw.loader.load('//meta.miraheze.org/w/index.php?title=MediaWiki:UserInfo.js&action=raw&ctype=text/javascript');

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').replace('.wikiforge.net', ''), cp = ( headers['x-served-by'] ? headers['x-served-by'] :  ).replace(/.wikiforge.net|^mw[0-9]+|^test[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'); }

$.when(mw.loader.using(["mediawiki.api"])).then(function {        return new mw.Api            .get({ action: "query", meta: "siteinfo", siprop: "statistics", format: "json", })           .then(function (data) { var jobs = data.query.statistics.jobs, caption = 'Queued Jobs: ' + jobs; if (mw.config.get('skin') === 'cosmos') { $('').html(caption).appendTo('#p-tb ul'); } else { $('').html(caption).prependTo('#p-personal ul'); }           });    }); }