<commit_before>var debug = false;

var compteur = 0;
var maxCpt = 16;
var minVideo,maxVideo;
var mobile = true;
var lastVideoPlayed = { "val" : "000"};

function unbindAllKeypress(){
    $(document).unbind('keypress');
}

function unbindAllEvents(){
    $(document).unbind('keydown');
    $(document).unbind('keyup');
    $(document).unbind('keypress');
}

function restartOnLastCheckpoint(){
  changeVideo(lastVideoPlayed["val"]);
}

window.addEventListener('touchstart', function videoStart() {
video.play();
console.log('first touch');
// remove from the window and call the function we are removing
this.removeEventListener('touchstart', videoStart);
});

window.onerror = function (message, url, lineNo){
    console.log('Error: ' + message + '\n' + 'Line Number: ' + lineNo);
    return true;
}

// Gestion de l'assigmenent des vidéo clefs par evennement
$(document).ready(function(){


    for (var i = 0; i < game_json.scenario.length; i++) {
      var videoObj = game_json.scenario[i];
      if(videoObj.hasOwnProperty("onstart")){
        $('#video_'+videoObj.id).on('play',videoObj,function(event){
          stopVideo(event.data.onstart.stopvideo);
        });
      }
      if(videoObj.hasOwnProperty("onend")){
        $('#video_'+videoObj.id).on('ended',videoObj,function(event){
          unbindAllEvents();
          var text = "";
          if(event.data.onend.hasOwnProperty("text")){
            text = event.data.onend.text;
          }<commit_msg>test mobile<commit_after>var debug = false;

var compteur = 0;
var maxCpt = 16;
var minVideo,maxVideo;
var mobile = true;
var lastVideoPlayed = { "val" : "000"};

function unbindAllKeypress(){
    $(document).unbind('keypress');
}

function unbindAllEvents(){
    $(document).unbind('keydown');
    $(document).unbind('keyup');
    $(document).unbind('keypress');
}

function restartOnLastCheckpoint(){
  changeVideo(lastVideoPlayed["val"]);
}

var ONLYONETIME_EXECUTE = null;

window.addEventListener('load', function(){ // on page load

    document.body.addEventListener('touchstart', function(e){

  if (ONLYONETIME_EXECUTE == null) {

        video.play();

        //if you want to prepare more than one video/audios use this trick :
          // video2.play();
          // video2.pause();
          // now video2 is buffering and you can play it programmability later

        ONLYONETIME_EXECUTE = 0;
        }

    }, false)

}, false)

// Gestion de l'assigmenent des vidéo clefs par evennement
$(document).ready(function(){


    for (var i = 0; i < game_json.scenario.length; i++) {
      var videoObj = game_json.scenario[i];
      if(videoObj.hasOwnProperty("onstart")){
        $('#video_'+videoObj.id).on('play',videoObj,function(event){
          stopVideo(event.data.onstart.stopvideo);
        });
      }
      if(videoObj.hasOwnProperty("onend")){
        $('#video_'+videoObj.id).on('ended',videoObj,function(event){
          unbindAllEvents();
          var text = "";
          if(event.data.onend.hasOwnProperty("text")){
            text = event.data.onend.text;
          }
{'fraction_non_alphanumeric': 0.15858026701400196, 'fraction_numerical': 0.005861282969716704, 'mean_word_length': 3.3698435277382646, 'pattern_counts': {'":': 0, '<': 5, '<?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': '1886529', 'n_tokens_mistral': 978, 'n_tokens_neox': 961, 'n_words': 194}