<commit_before>var clock;
var sound = new Audio('../assets/tick.wav')

$(document).ready(function() {
  $('#bomb').hide();
  clock = $('#clock').FlipClock({
        clockFace: 'MinuteCounter',
        autoStart: false,
            countdown: true,
        callbacks: {
          stop: function() {
            $('#clock').hide();
            $('body').css('background-color', 'black');
            $('#bomb').show();
            $('#bomb')[0].play();
          },
          interval: function () {
            sound.play();
          }
        }
    });
});

socket = io.connect();

socket.on('countdown', function(data) {
    $('.message').html('');
    clock.setTime(data.duration * 60);
clock.setCountdown(true);
clock.start();
});<commit_msg>Make clock restart-able<commit_after>var clock;
var sound = new Audio('../assets/tick.wav')

$(document).ready(function() {
  $('#bomb').hide();
  clock = $('#clock').FlipClock({
        clockFace: 'MinuteCounter',
        autoStart: false,
        countdown: true,
        callbacks: {
          stop: function() {
            if(clock.getTime() == 0){

              $('#clock').hide();
              $('body').css('background-color', 'black');
              $('#bomb').show();
              $('#bomb')[0].play();
              setTimeout(function(){location.reload();},5000);
            }
          },
          interval: function () {
              sound.play();
          }
        }
    });
});

socket = io.connect();

socket.on('countdown', function(data) {
    $('.message').html('');
    clock.setTime(data.duration * 60);
    clock.setCountdown(true);
    clock.start();
});
{'fraction_non_alphanumeric': 0.21323529411764705, 'fraction_numerical': 0.006740196078431373, 'mean_word_length': 2.046641791044776, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1254159', 'n_tokens_mistral': 484, 'n_tokens_neox': 483, 'n_words': 77}