From 92a14df635abdad970bd3f14ec602f6630b793b0 Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Sat, 7 Dec 2013 00:48:44 +0100 Subject: [PATCH] use setInterval rather than setTimeout, cosmetic fixes --- nsupdate/main/templates/main/update.html | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/nsupdate/main/templates/main/update.html b/nsupdate/main/templates/main/update.html index 2974590..56ee199 100644 --- a/nsupdate/main/templates/main/update.html +++ b/nsupdate/main/templates/main/update.html @@ -41,7 +41,7 @@ $('#response_timestamp').text(new Date().toISOString()); last_ip = ip; }) - .fail(function (data) { + .fail(function( data ) { $('#response').text('update failed'); $('#response_timestamp').text(new Date().toISOString()); }); @@ -50,11 +50,10 @@ .fail(function( data ) { $('#response').text('myip failed'); }); - setTimeout('checkIP', 300000); // repeat in N ms } $(document).ready(function() { - checkIP(); + setInterval(checkIP, 300000); // repeat every N ms }); {% endblock %}