X-Git-Url: https://git.nubati.net/cgi-bin/gitweb.cgi?p=phpfspot.git;a=blobdiff_plain;f=phpfspot.js;h=588298ab3691f53755d013e34bdf31aadcfa73b5;hp=06f20e0314d763ec6211a3ea79a9a4bec6caa65e;hb=9bc01791641ed3e4c52dddcb0991fa28bb2d63b5;hpb=70704d20a135f84e7d18072a883807ca5642b1f2 diff --git a/phpfspot.js b/phpfspot.js index 06f20e0..588298a 100644 --- a/phpfspot.js +++ b/phpfspot.js @@ -315,9 +315,11 @@ function nextSlide() function autoBrowse() { - var next_link = document.getElementById('next_link').href; - window.location.href = next_link; - setTimeout("autoBrowse()", 5000); + if(document.getElementById('next_link')) { + var next_link = document.getElementById('next_link').href; + window.location.href = next_link; + setTimeout("autoBrowse()", 5000); + } } var startup = 1;