Skip to content

Instantly share code, notes, and snippets.

setInterval(function() {
var time = ((countdownTimestamp * 1000) - new Date()) / 1000,
h = Math.floor(time / 60),
s = Math.floor(time % 60),
title = h + ":" + s;
document.getElementsByTagName("title")[0].textContent = title;
}, 1000);