2
# Copyright (C) Martijn Voncken 2008 <mvoncken@gmail.com>
4
# This program is free software; you can redistribute it and/or modify
5
# it under the terms of the GNU General Public License as published by
6
# the Free Software Foundation; either version 3, or (at your option)
9
# This program is distributed in the hope that it will be useful,
10
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
# GNU General Public License for more details.
14
# You should have received a copy of the GNU General Public License
15
# along with this program. If not, write to:
16
# The Free Software Foundation, Inc.,
17
# 51 Franklin Street, Fifth Floor
18
# Boston, MA 02110-1301, USA.
20
# In addition, as a special exception, the copyright holders give
21
# permission to link the code of portions of this program with the OpenSSL
23
# You must obey the GNU General Public License in all respects for all of
24
# the code used other than OpenSSL. If you modify file(s) with this
25
# exception, you may extend this exception to your version of the file(s),
26
# but you are not obligated to do so. If you do not wish to do so, delete
27
# this exception statement from your version. If you delete this exception
28
# statement from all source files in the program, then also delete it here.
33
quick and dirty auto-refresh timer.
34
Our users have waited too long for a new auto-refresh.
35
I need to get things done (even if it's not pretty). ;with the least dependencies for a backport to 1.05
38
var refresh_secs = 10;
41
function continue_timer(){
46
if (seconds > refresh_secs){
50
prc = ((seconds / refresh_secs) * 100 );
51
el("timer_bar").style.width = prc + "%";
52
setTimeout("continue_timer()",100)
55
function do_refresh(){
56
location.reload(true);
59
function start_timer(){
62
el("timer_pause").style.display = "none";
63
el("timer_start").style.display = "inline";
64
el("timer_outer").title = "Auto refresh:Active; click here to pause";
65
setCookie('auto_refresh',"1");
67
function stop_timer(){
69
el("timer_pause").style.display = "inline";
70
el("timer_start").style.display = "none";
71
el("timer_outer").title = "Auto refresh:Paused; click here to start";
72
setCookie('auto_refresh',"0");
76
function toggle_timer() {