MediaWiki:Resources/landingpage.js: Difference between revisions

Content deleted Content added
No edit summary
oh lord, not this bug again
Line 7:
return qs == null ? '' : qs[1];
}
 
function checkPaymentOutages() {
/* Check against the scheduled payment method outages
* in global variable "outages" (loaded cross-wiki from meta)
* and hide the relevant button for any which are ongoing.
*/
var outages = outages || []; // don't die if it hasn't loaded...
var now = new Date();
for (var i = outages.length - 1; i >= 0; i--) {
if ( now > outages[i]['start'] && now < outages[i]['end'] ) {
if (outages[i]['country'] && outages[i]['country'] == Geo.country) {
$('.paymentmethod-' + outages[i]['method']).hide();
}
}
}
}
 
// Pull outages list from meta, then run the function
$.getScript('//meta.wikimedia.org/w/index.php?title=MediaWiki:FR2013/Resources/PaymentOutages.js&action=raw', checkPaymentOutages() );
 
$(document).ready(function(){