summaryrefslogtreecommitdiffstats
path: root/templates/javascript_refresh.inc.php
diff options
context:
space:
mode:
authorPaul 'flowerysong' Arthur <flowerysong00@yahoo.com>2010-06-24 02:52:01 +0000
committerPaul 'flowerysong' Arthur <flowerysong00@yahoo.com>2010-06-24 02:52:01 +0000
commit62774923211c2e391534d83e6c7d97acae086766 (patch)
treea43d0ce9345df18b0f67b61e044636114ce56aba /templates/javascript_refresh.inc.php
parent7549180515107d924610a22c5acf1a0e44b4b9f5 (diff)
downloadampache-62774923211c2e391534d83e6c7d97acae086766.tar.gz
ampache-62774923211c2e391534d83e6c7d97acae086766.tar.bz2
ampache-62774923211c2e391534d83e6c7d97acae086766.zip
JavaScript cleanup. Consistently use camelCase for naming JS functions. Use
Prototype functionality where possible (particularly for Ajax). Move our JS into lib/javascript (I dropped kajax as an external module since the new ajax.js is completely different apart from function headers.) Remove unused JS functions from base.js.
Diffstat (limited to 'templates/javascript_refresh.inc.php')
-rw-r--r--templates/javascript_refresh.inc.php18
1 files changed, 2 insertions, 16 deletions
diff --git a/templates/javascript_refresh.inc.php b/templates/javascript_refresh.inc.php
index 5f0a07ed..b0c8d9f5 100644
--- a/templates/javascript_refresh.inc.php
+++ b/templates/javascript_refresh.inc.php
@@ -22,27 +22,13 @@
?>
<script type="text/javascript" language="javascript">
-<!-- Begin
// Set refresh interval (in seconds)
-var refreshinterval=<?php echo $refresh_limit ?>;
-
-function doLoad()
-{
- // the timeout value should be the same as in the "refresh" meta-tag
- setTimeout( "refresh()", refreshinterval*1000 );
-}
+var refreshInterval=<?php echo $refresh_limit ?>;
function refresh()
{
- // This version of the refresh function will cause a new
- // entry in the visitor's history. It is provided for
- // those browsers that only support JavaScript 1.0.
- //
ajaxPut('<?php echo $ajax_url; ?>');
- doLoad();
}
-// start with page-load
-doLoad();
-// End -->
+new PeriodicalExecuter(refresh, refreshInterval);
</script>