Skip to content

Instantly share code, notes, and snippets.

@slawekkolodziej
Last active January 3, 2016 07:08
Show Gist options
  • Save slawekkolodziej/8426953 to your computer and use it in GitHub Desktop.
Save slawekkolodziej/8426953 to your computer and use it in GitHub Desktop.
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);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment