summaryrefslogtreecommitdiff
path: root/www/js/clock.js
diff options
context:
space:
mode:
Diffstat (limited to 'www/js/clock.js')
-rw-r--r--www/js/clock.js12
1 files changed, 3 insertions, 9 deletions
diff --git a/www/js/clock.js b/www/js/clock.js
index a99b5f8..59f53de 100644
--- a/www/js/clock.js
+++ b/www/js/clock.js
@@ -43,10 +43,6 @@ function Clock() {
this.draw_callbacks.fireWith(window, [date_str, time_str, get_rd_week(rdtime_ms)]);
}
- this.addCallback = function(cb) {
- this.draw_callbacks.add(cb);
- }
-
this.ntp_update = function(event) {
var t4 = (+new Date());
@@ -110,13 +106,11 @@ var clock = new Clock();
function clock_init() {
clock.start();
+ clock_draw('Do, 1.1.1970', '00:00:00', 0);
+ clock.addCallback(clock_draw);
}
-function clock_add_callback(cb) {
- clock.addCallback(cb);
-}
-
-function drawClock(date, time, week) {
+function clock_draw(date, time, week) {
$('#clock span.clock-date').text(date);
$('#clock span.clock-time').text(time);
var weekspan = $('#clock span.current-week').removeClass().addClass('current-week').addClass('label');