Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

MediaWiki:Gadget-challenge-live-tracker.js: Difference between revisions

MediaWiki interface page
Content added Content deleted
mNo edit summary
mNo edit summary
Line 1: Line 1:
'use strict';

(function ( $ ) {
(function ( $ ) {
$(function() {
var $bubbles = $( '#cl-tracker' ).children();
var $bubbles = $( '#cl-tracker' ).children();
var today = new Date(new Date().toLocaleString('en-US', { timeZone: 'Asia/Tokyo' })).getDay();
var today = new Date(new Date().toLocaleString('en-US', { timeZone: 'Asia/Tokyo' })).getDay();
if ( today === 0 ) { // 0 is sunday, which is day 7 in CL
if ( today === 0 ) { // 0 is sunday, which is day 7 in CL
today = 7;
today = 7;
}
}
$bubbles.each(function( index ) {
$bubbles.each(function( index ) {
$( this ).addClass('cl-bubble-complete');
$( this ).addClass('cl-bubble-complete');
});
});
});
})( jQuery );
})( jQuery );

Revision as of 02:10, 5 December 2021

'use strict';

(function ( $ ) {
	$(function() {
		var $bubbles = $( '#cl-tracker' ).children();
		
		var today = new Date(new Date().toLocaleString('en-US', { timeZone: 'Asia/Tokyo' })).getDay();
		
		if ( today === 0 ) { // 0 is sunday, which is day 7 in CL
			today = 7;
		}
		
		$bubbles.each(function( index ) {
			$( this ).addClass('cl-bubble-complete');
		});
	});
})( jQuery );
Cookies help us deliver our services. By using our services, you agree to our use of cookies.