changeset 146:672c7f28fb97

Cleanups.
author Matti Hamalainen <ccr@tnsp.org>
date Wed, 23 Oct 2013 02:17:14 +0300
parents 66b485431cac
children 91af5b225fd6
files show.php
diffstat 1 files changed, 5 insertions(+), 20 deletions(-) [+]
line wrap: on
line diff
--- a/show.php	Wed Oct 23 02:01:07 2013 +0300
+++ b/show.php	Wed Oct 23 02:17:14 2013 +0300
@@ -28,36 +28,22 @@
   </div>
 </noscript>
 
-<div class="showView" id="mainView0"></div>
-<div class="showView" id="mainView1"></div>
+<div class="showView" id="mainView"></div>
 
 <!-- ========================== -->
 
 <script type="text/javascript">
 
 var failCount = 0;
-var prevView = -1, activeView = 0, lastUpdate = 0;
+var lastUpdate = 0;
 var errorView = false;
 
 
-function tickAnim()
-{
-  if (activeView != prevView)
-  {
-    document.getElementById("mainView0").style.display = (activeView == 0) ? "block" : "none";
-    document.getElementById("mainView1").style.display = (activeView == 1) ? "block" : "none";
-    prevView = activeView;
-  }
-}
-
-
 function updateView(txt)
 {
-  var view = document.getElementById("mainView"+ activeView);
+  var view = document.getElementById("mainView");
   if (view)
-  {
     view.innerHTML = txt;
-  }
 }
 
 
@@ -118,7 +104,7 @@
     {
       if (!timeOutSet)
       {
-        setTimeout("tickMain();", 2000);
+        setTimeout("tickMain();", 5000);
         timeOutSet = true;
       }
     }
@@ -137,8 +123,7 @@
   sendPOSTRequest("action=check&lastUpdate="+lastUpdate, msuccess, mfail);
 }
 
-setTimeout("tickMain();", 1000);
-setInterval("tickAnim();", 25);
+setTimeout("tickMain();", 100);
 viewChanged();
 
 </script>