<commit_before>var hidden = $("tr.hidden-xs-up");

$(document).bind('keydown', function(event) {

    // show hidden files
    if( event.altKey ) {
        $(hidden).addClass( "reveal" ).removeClass( "hidden-xs-up");
        stripedRows();
    }
    // countRows();
    
}).bind('keyup',function(){
    
    // hide hidden files again
    $(hidden).removeClass( "reveal" ).addClass( "hidden-xs-up");
    stripedRows();
});

$(document).bind('keyup', function(event) {
    
    // focus search input
    if (event.which === 70) {
        $("#listr-search").focus();
        $(document).scrollTop(0);
    }

    // Control HTML5 player (only if modal is visible)
    if (viewer.hasClass('in')) {

        // Play/pause
        if (event.which === 32) {

            event.preventDefault();

            if (player.paused === false) {
              player.pause();
            } else {
              player.play();
            }
        }

        // Seek backward
        if (event.which === 37) {
            player.currentTime -= 1;
        }

        // Seek forward
        if (event.which === 39) {
            player.currentTime += 1;
        }

        // Rewind player
        if (event.which === 37 && event.shiftKey) {
            player.currentTime = 0;
        }

        // Increase volume
        if (event.which === 38) {
            player.volume += 0.1;
        }

        // Max volume
        if (event.which === 38 && event.shiftKey) {
            player.volume = 1;
        }

        // Decrease volume
        if (event.which === 40) {
            player.volume -= 0.1;
        }

        // Mute volume
        if (event.which === 40 && event.shiftKey) {
            player.volume = 0;
        }

    }
});<commit_msg>JavaScript module; add fullscreen shortcut<commit_after>var k,
Keyboard = {

  config: {
      hidden: $("tr.hidden-xs-up"),
      keyboard: $("#viewer-modal"),
      search: $("#listr-search")
  },

    init: function() {
        m = this.config;
        this.events();
    },

    // Keyboard events
    events: function() {

      $(document).bind('keydown', function(event) {
        Keyboard.revealFiles();
      }).bind('keyup',function(){
          Keyboard.hideFiles();
      });

      $(document).bind('keyup', function(event) {
          Keyboard.playerControls();
      })

      $(document).bind('keyup', function(event) {
          Keyboard.focusSearch();
      })
    },

    // show hidden files
    revealFiles: function() {
        if( event.altKey ) {
            $(m.hidden).addClass( "reveal" ).removeClass( "hidden-xs-up");
            stripedRows();
        }
    },

    // hide hidden files again
    hideFiles: function() {
        $(m.hidden).removeClass( "reveal" ).addClass( "hidden-xs-up");
        stripedRows();
    },

    // focus search input
    focusSearch: function() {
        if (!viewer.hasClass('in')) {
         if (event.which === 70) {
             $(m.search).focus();
             $(document).scrollTop(0);
         }
        }
    },

    // Control HTML5 player
    playerControls: function() {
        // Only when modal is visible
        if (viewer.hasClass('in')) {

          // Fullscreen
          if (event.which === 70) {
            if (player.requestFullscreen) {
              player.requestFullscreen();
            } else if (player.msRequestFullscreen) {
              player.msRequestFullscreen();
            } else if (player.mozRequestFullScreen) {
              player.mozRequestFullScreen();
            } else if (player.webkitRequestFullscreen) {
              player.webkitRequestFullscreen();
            }
          }

          // Play/pause
          if (event.which === 32) {

            event.preventDefault();

            if (player.paused === false) {
              player.pause();
            } else {
              player.play();
            }
          }

          // Seek backward
          if (event.which === 37) {
            player.currentTime -= 1;
          }

          // Seek forward
          if (event.which === 39) {
            player.currentTime += 1;
          }

          // Rewind player
          if (event.which === 37 && event.shiftKey) {
            player.currentTime = 0;
          }

          // Increase volume
          if (event.which === 38) {
            player.volume += 0.1;
          }

          // Max volume
          if (event.which === 38 && event.shiftKey) {
            player.volume = 1;
          }

          // Decrease volume
          if (event.which === 40) {
            player.volume -= 0.1;
          }

          // Mute volume
          if (event.which === 40 && event.shiftKey) {
            player.volume = 0;
          }
        }
    }
};
{'fraction_non_alphanumeric': 0.15138683040440398, 'fraction_numerical': 0.012703789964005929, 'mean_word_length': 1.4040712468193384, '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': '306920', 'n_tokens_mistral': 1404, 'n_tokens_neox': 1310, 'n_words': 272}