Skip to content

Instantly share code, notes, and snippets.

@sash13
Created December 31, 2012 20:25
Show Gist options
  • Select an option

  • Save sash13/4422492 to your computer and use it in GitHub Desktop.

Select an option

Save sash13/4422492 to your computer and use it in GitHub Desktop.
var f = function () {
var d = new Date();
var nd = new Date(d.getTime() + (d.getTimezoneOffset() * 60000) + (3600000 * 4));
var e = new Date(new Date(2014, 1, 1, 0, 0, 0, 0).getTime() - nd.getTime());
var req = new XMLHttpRequest();
req.open("POST", "/al_page.php", true);
req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
req.send("act=current_info&al=1&hash=your_info_hash&info=" + e.getHours() + "h " + e.getMinutes() + "m&oid=your_oid");
}
var int = window.setInterval(f, 60000)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment