Convert player profile statistics to time format as needed

This commit is contained in:
Brian Miyaji
2016-12-20 23:46:07 +11:00
parent 3cd240937d
commit f1c5657a83
3 changed files with 82 additions and 8 deletions

View File

@@ -832,6 +832,10 @@ jQuery(document).ready(function($){
$('.sp-convert-time-input').change(function() {
var s = 0;
var val = $(this).val();
if (val === '') {
$(this).siblings('.sp-convert-time-output').val('');
return;
}
var a = val.split(':').reverse();
$.each(a, function( index, value ) {
s += parseInt(value) * Math.pow(60, index);