Skip to content

Instantly share code, notes, and snippets.

@Xyvyrianeth
Created February 22, 2017 15:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Xyvyrianeth/69625710dfbaed88d248f08432309e07 to your computer and use it in GitHub Desktop.
Save Xyvyrianeth/69625710dfbaed88d248f08432309e07 to your computer and use it in GitHub Desktop.
clock = setInterval(function() {
if (new Date().getHours() < 10) {
hours = "0" + new Date().getHours();
} else {
hours = new Date().getHours();
}
if (new Date().getMinutes() < 10) {
minutes = "0" + new Date().getMinutes();
} else {
minutes = new Date().getMinutes();
}
if (new Date().getSeconds() < 10) {
seconds = "0" + new Date().getSeconds();
} else {
seconds = new Date().getSeconds();
}
Clock = "[" + hours + ":" + minutes + ":" + seconds + "]";
}, 0);
$("body #bottom .relative").append('<div id="clock" class="ugly-button clock" style="position:fixed; bottom:35px; left:660px; width:110px; text-align:left; font-family:' + fixedWidth + '; border-style:inset; border-width:2px; background-color:#000000">Loading...</div>');
setInterval(function() {
$("#clock").html("TIME " + Clock);
}, 1);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment