Jump to content

User:MindstormsKid/vector.js

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by MindstormsKid (talk | contribs) at 04:06, 1 September 2009 (fix). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

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.
document.write('<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>');

// clock!
addOnloadHook(function(){
	jQuery.noConflict();

	jQuery("#p-personal ul").prepend('<li id="pt-time">');

	setInterval(function(){
		var date = new Date();
		jQuery("#pt-time").html(addzero(date.getUTCHours()) + ":" + addzero(date.getUTCMinutes()) + ":" + addzero(date.getUTCSeconds()));
	}, 1000);

	function addzero(n) { return (n < 10 ? "0" : "") + n; }
});