MediaWiki:Common.js: Difference between revisions

Content deleted Content added
dependence on mw.util
add retry for country=XX - phab:T316578
Line 5:
$(function() {
mw.loader.using( ['mediawiki.util', 'mediawiki.Uri'] ).done( function() {
// If there was a problem detecting country, try sending them round again
// for another bite at the cookie - https://phabricator.wikimedia.org/T316578
var uri = new mw.Uri( window.location.href );
if ( uri.query.title === 'Special:LandingPage' && uri.query.country === 'XX' && uri.query.retried === undefined ) {
uri.path = '';
uri.query.retried = 1; // only do this once
delete uri.query.country;
delete uri.query.title;
window.location.href = uri.toString();
}
// Disable logo link