upload_time_estimation_add(e.loaded);
// Get speed string
var speed_str = upload_time_estimation_speed_string();
+ speed_str = upload_speed_refresh_limiter(speed_str);
// Get time string
var time_str = chrono_update(upload_time_estimation_time());
-
+
show_upload_progression (p_str, speed_str, time_str);
}
upload_time_estimation_add(e.loaded + async_global_transfered);
// Get speed string
var speed_str = upload_time_estimation_speed_string();
+ speed_str = upload_speed_refresh_limiter(speed_str);
// Get time string
var time_str = chrono_update(upload_time_estimation_time());
time_str = milliseconds_to_time_string (chrono);
return time_str;
}
+
+var upload_speed_refresh_limiter_last_update = 0;
+var upload_speed_refresh_limiter_last_value = '';
+function upload_speed_refresh_limiter(speed_str)
+{
+ var d = new Date();
+ if (d.getTime() - upload_speed_refresh_limiter_last_update > 1500)
+ {
+ upload_speed_refresh_limiter_last_value = speed_str;
+ upload_speed_refresh_limiter_last_update = d.getTime();
+ }
+ return upload_speed_refresh_limiter_last_value;
+}
<link href="<?php echo $web_root . 'media/' . $style . '/style.css.php'; ?>" rel="stylesheet" type="text/css" />
</head>
<body>
-<script language="Javascript" src="lib/functions_v3.js"></script>
+<script language="Javascript" src="lib/functions_v4.js"></script>
<div id="content">
<h1><a href="<?php echo $web_root; ?>"><?php echo t('Jirafeau, your web file repository'); ?></a></h1>