From 4d5eed551fde86dd15ca4e879fd6c9ec466a4b1a Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 14 Aug 2012 19:30:49 +0400 Subject: only precache_headlines_idle() when actually idle --- js/functions.js | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) (limited to 'js/functions.js') diff --git a/js/functions.js b/js/functions.js index b2d79dc56..578172c77 100644 --- a/js/functions.js +++ b/js/functions.js @@ -393,20 +393,6 @@ function getURLParam(param){ return String(window.location.href).parseQuery()[param]; } -function leading_zero(p) { - var s = String(p); - if (s.length == 1) s = "0" + s; - return s; -} - -function make_timestamp() { - var d = new Date(); - - return leading_zero(d.getHours()) + ":" + leading_zero(d.getMinutes()) + - ":" + leading_zero(d.getSeconds()); -} - - function closeInfoBox(cleanup) { try { dialog = dijit.byId("infoBox"); @@ -1718,3 +1704,8 @@ function get_radio_checked(radioObj) { } return(""); } + +function get_timestamp() { + var date = new Date(); + return Math.round(date.getTime() / 1000); +} -- cgit v1.2.3-54-g00ecf