User:Tnhung2011/global.js

(function(mw, $) {	if (!utc) var utc = 7;	if (new URL(window.location.href).search === '?action=history') {		$(' ', { class: 'mw-ui-button', text: "Change Timezone" }).click(function { utc = input; }).prependTo(mw.util.$content[0].childNodes[8]);		for (const element of $(".mw-changeslist-date")) {			var months = {"January": "0", "Febuary": "1", "March": "2", "April": "3", "May": "4", "June": "5", "July": "6", "August": "7", "September": "8", "October": "9", "November": "10", "December": "11"};			var date = element.innerHTML.replace(',', '').replace(':', ' ').split(' ');			date[3] = months[date[3]];			for (var i = 0; i < date.length; i++) date[i] = parseInt(date[i], 10);			date = new Date(Date.UTC(date[4], date[3], date[2], date[0], date[1], 0));			date.setHours(date.getHours + utc);			date = date.toLocaleString('fr-FR', { timeZone: 'UTC' }).replaceAll('/', ' ').replaceAll(':', ' ').split(' ');			months = ["", "January", "Febuary", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];			date[0] = parseInt(date[0], 10).toString; date.pop; date[1] = months[parseInt(date[1], 10)]; months = date.pop; element.innerHTML = date.pop + ":" + months + ", " + date.join(" "); }	} })(window.mediaWiki, window.jQuery);