Jump to content

User:Feminist/afdclock.js

From Wikipedia, the free encyclopedia
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
function pad(n) {
	if (n < 10) {
		var s = "0" + n;
		return s;
	}
	return n;
}


if ((window.location.href).indexOf("Wikipedia:Articles_for_deletion") > -1) {
	$("#p-personal ul").append('<li id=\"autotime\"></li>');
	setInterval(function() {
		var date = new Date();
    	$('#autotime').text(date.getUTCFullYear() + "-" + pad(date.getUTCMonth() + 1) + "-" + pad(date.getUTCDate()) + " " + date.getUTCHours() + ":" + pad(date.getUTCMinutes()) + ":" + pad(date.getUTCSeconds()));
	}, 1000);
}