Difference between revisions of "Template:Kyoto Common"

Line 410: Line 410:
 
     if (interval < 0) {
 
     if (interval < 0) {
 
         $countdown.hide();
 
         $countdown.hide();
     } else if (interval < 4 * 24 * 3600) {
+
     } else {
 
         if (interval < 1 * 3600)
 
         if (interval < 1 * 3600)
 
             $countdown.css("color", "#f00");
 
             $countdown.css("color", "#f00");
Line 422: Line 422:
 
         time.push(itos(minute_qr[1], 2) + 'm');
 
         time.push(itos(minute_qr[1], 2) + 'm');
 
         time.push(itos(minute_qr[0], 2) + 'h');
 
         time.push(itos(minute_qr[0], 2) + 'h');
        $countdown.text(time.reverse().join(' : '));
 
        $countdown.show();
 
    } else {
 
        var time = [];
 
        interval = Math.floor(interval / 60);
 
        var minute_qr = qr(interval, 60);
 
        time.push(itos(minute_qr[1], 2) + 'm');
 
 
         var hour_qr = qr(minute_qr[0], 24);
 
         var hour_qr = qr(minute_qr[0], 24);
        time.push(itos(hour_qr[1], 2) + 'h');
 
 
         time.push(itos(hour_qr[0], 3) + 'd');
 
         time.push(itos(hour_qr[0], 3) + 'd');
 
         $countdown.text(time.reverse().join(' : '));
 
         $countdown.text(time.reverse().join(' : '));

Revision as of 09:50, 12 October 2016

count down