From 561492c367a3fb054891305eb3cd27f613c6ee7b Mon Sep 17 00:00:00 2001 From: Thomas BrĂ¼derli Date: Mon, 2 Jul 2007 14:24:27 +0000 Subject: Include now() to it.js --- itjs/it.js | 8 ++++++++ itjs/state.js | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/itjs/it.js b/itjs/it.js index 5afdb52..4daf2c0 100644 --- a/itjs/it.js +++ b/itjs/it.js @@ -157,6 +157,14 @@ function it_set(dst, src) } } +/** + * Return the current timestamp + */ +function it_now() +{ + return new Date().getTime(); +} + /** * Encodes arbitrary string for use in an url * @param str string to be encoded diff --git a/itjs/state.js b/itjs/state.js index 04f8acf..9521093 100644 --- a/itjs/state.js +++ b/itjs/state.js @@ -49,7 +49,7 @@ new_history_entry: function(p) if (!this.it_iframe && !(this.it_iframe = document.getElementById('it_state'))) ED('it_state::new_history_entry(): it_state object not found!'); - this.it_iframe.src = "/itjs/state.html?t="+now(); + this.it_iframe.src = "/itjs/state.html?t="+it_now(); this.it_history_field = null; }, -- cgit v1.2.3