<commit_before>;(function() {

  var channel = window.location.pathname.split('/')[2];

  if( channel ) {
    console.log( channel );

    document.getElementById('smpte_message').innerHTML = 'Establishing uplink...';

    var source = new EventSource('/tune_in/' + channel);

    source.addEventListener('open', function(e) {
      document.getElementById('smpte_message').innerHTML = 'Awaiting transmission...';
      // Connection was opened.
      console.log('[open]', e);
    }, false);

    source.addEventListener('message', function(e) {
      var payload = JSON.parse( e.data );

      console.log('[message]', payload);

      document.getElementById('smpte').style.display = 'none';
      document.getElementById('program').setAttribute('src', payload.url);
    }, false);

    source.addEventListener('error', function(e) {
      if (e.eventPhase == EventSource.CLOSED) {
        console.log('[error]', e);
        document.getElementById('smpte_message').innerHTML = 'Tranmission lost...';
        document.getElementById('program').setAttribute('src', 'about:blank');
        // Move this functionality to a class for better cross-browser support
        document.getElementById('smpte').style.display = '-webkit-box';
        // Connection was closed.
      }
    }, false);
  } else {
    document.getElementById('smpte_message').innerHTML = 'No signal';
  }

})();<commit_msg>Fixed a typo<commit_after>;(function() {

  var channel = window.location.pathname.split('/')[2];

  if( channel ) {
    console.log( channel );

    document.getElementById('smpte_message').innerHTML = 'Establishing uplink...';

    var source = new EventSource('/tune_in/' + channel);

    source.addEventListener('open', function(e) {
      document.getElementById('smpte_message').innerHTML = 'Awaiting transmission...';
      // Connection was opened.
      console.log('[open]', e);
    }, false);

    source.addEventListener('message', function(e) {
      var payload = JSON.parse( e.data );

      console.log('[message]', payload);

      document.getElementById('smpte').style.display = 'none';
      document.getElementById('program').setAttribute('src', payload.url);
    }, false);

    source.addEventListener('error', function(e) {
      if (e.eventPhase == EventSource.CLOSED) {
        console.log('[error]', e);
        document.getElementById('smpte_message').innerHTML = 'Transmission lost...';
        document.getElementById('program').setAttribute('src', 'about:blank');
        // Move this functionality to a class for better cross-browser support
        document.getElementById('smpte').style.display = '-webkit-box';
        // Connection was closed.
      }
    }, false);
  } else {
    document.getElementById('smpte_message').innerHTML = 'No signal';
  }

})();
{'fraction_non_alphanumeric': 0.16571018651362984, 'fraction_numerical': 0.0007173601147776184, 'mean_word_length': 3.3646322378716746, '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': '5996689', 'n_tokens_mistral': 777, 'n_tokens_neox': 748, 'n_words': 146}