<commit_before>// Modified by <NAME> & <NAME> for Podplay.me

// A cross-browser javascript shim for html5 audio
(function(audiojs, audiojsInstance, container) {
  // Use the path to the audio.js file to create relative paths to the swf and player graphics
  // Remember that some systems (e.g. ruby on rails) append strings like '?1301478336' to asset paths
  var path = (function() {
    var re = new RegExp('audio(\.min)?\.js.*'),
        scripts = document.getElementsByTagName('script');
    for (var i = 0, ii = scripts.length; i < ii; i++) {
      var path = scripts[i].getAttribute('src');
      if(re.test(path)) return path.replace(re, '');
    }
  })();
  
  // ##The audiojs interface
  // This is the global object which provides an interface for creating new `audiojs` instances.
  // It also stores all of the construction helper methods and variables.
  container[audiojs] = {
    instanceCount: 0,
    instances: {},
    // The markup for the swf. It is injected into the page if there is not support for the `<audio>` element. The `$n`s are placeholders.  
    // `$1` The name of the flash movie  
    // `$2` The path to the swf  
    // `$3` Cache invalidation  
    flashSource: '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ' +
        'id="$1" width="1" height="1" name="$1" style="position: absolute; ' +
        'left: -1px;"><param name="movie" value="$2?playerInstance=' + audiojs +
        '.instances[\'$1\']&datetime=$3"><param name="allowscriptaccess"' +
        'value="always"><embed name="$1" src="$2?playerInstance=' + audiojs +
        '.instances[\'$1\']&datetime=$3" width="1" height="1" allowscriptaccess' + 
        '="always"></object>',

    // ### The main settings object
    // Where all the default settings are stored. Each of these variables and methods can be overwritten by the user-provided `options` object.
    settings: {
      autoplay: false,
      loop: false,
      preload: true,
      imageLocation: '',
      swfLocation: '/audiojs/audiojs.swf',
      useFlash: (function() {
        var a = document.createElement('audio');
        return !(a.canPlayType && a.canPlayType('audio/mpeg;').replace(/no/, ''));
      })(),
      hasFlash: (function() {
        if (navigator.plugins && navigator.plugins.length && navigator.plugins['Shockwave Flash']) {
          return true;
        } else if (navigator.mimeTypes && navigator.mimeTypes.length) {
          var mimeType = navigator.mimeTypes['application/x-shockwave-flash'];
          return mimeType && mimeType.enabledPlugin;
        } else {
          try {
            var ax = new ActiveXObject('ShockwaveFlash.ShockwaveFlash');
            return true;
          } catch (e) {}
        }
        return false;
      })(),
      // The default markup and classes for creating the player:
      createPlayer: {
        markup: '<div class="play-pause unselectable">' +
          '    <p class="play"></p>' +
          '    <p class="pause"></p>' +
          '    <p class="loading"></p>' +
          '</div>' +
          '<div class="skip unselectable" title="Skip back 15 seconds.">' +
          '    <span class="glyphicon glyphicon-repeat flip-glyph" aria-hidden="true"></span>' +
          '</div>' +
          '<div class="scrubber">' +
          '    <div class="progress"></div>' +
          '    <div class="loaded"></div>' +
          '</div>' +
          '<div class="skip unselectable" title="Skip ahead 30 seconds.">' +
          '    <span class="glyphicon glyphicon-repeat" aria-hidden="true"></span>' +
          '</div>' +
          '<div class="time unselectable">' +
          '    <span><em class="played">000:00</em></span>' +
          '    <div class="slider"></div>' +
          '</div>' +
          '<div class="volume unselectable" selectable="no">' +
          '    <span class="glyphicon glyphicon-volume-off" aria-hidden="true"></span>' +
          '    <span class="glyphicon glyphicon-volume-down" aria-hidden="true"></span>' +
          '    <span class="glyphicon glyphicon-volume-up" aria-hidden="true"></span>' +
          '</div>',
        playPauseClass: 'play-pause',
        scrubberClass: 'scrubber',
        progressClass: 'progress',
        loaderClass: 'loaded',
        timeClass: 'time',
        durationClass: 'duration',
        playedClass: 'played',
        errorMessageClass: 'error-message',
        playingClass: 'playing',
        loadingClass: 'loading',
        errorClass: 'error'
      },
      // The css used by the default player. This is is dynamically injected into a `<style>` tag in the top of the head.
      css: '',
      // The default event callbacks:
      trackEnded: function(e) {},
      flashError: function() {
        var player = this.settings.createPlayer,
            html = 'Missing <a href="http://get.adobe.com/flashplayer/">flash player</a> plugin.';
        //if (this.mp3) html += ' <a href="'+this.mp3+'">Download audio file</a>.';
        throw new Error(html);
      },
      loadError: function(e) {
        var player = this.settings.createPlayer,
        throw new Error('Error loading: "'+this.mp3+'"');
      },
      init: function() {
        var player = this.settings.createPlayer;
        container[audiojs].helpers.addClass(this.wrapper, player.loadingClass);
      },
      loadStarted: function() {
        var player = this.settings.createPlayer;
        container[audiojs].helpers.removeClass(this.wrapper, player.loadingClass);
      },
      loadProgress: function(percent) {
        var player = this.settings.createPlayer,
            scrubber = getByClass(player.scrubberClass, this.wrapper),
            loaded = getByClass(player.loaderClass, this.wrapper);
        loaded.style.width = (scrubber.offsetWidth * percent) + 'px';
      },
      playPause: function() {
        if (this.playing) this.settings.play();
        else this.settings.pause();<commit_msg>[Fix] syntax<commit_after>// Modified by <NAME> & <NAME> for Podplay.me

// A cross-browser javascript shim for html5 audio
(function(audiojs, audiojsInstance, container) {
  // Use the path to the audio.js file to create relative paths to the swf and player graphics
  // Remember that some systems (e.g. ruby on rails) append strings like '?1301478336' to asset paths
  var path = (function() {
    var re = new RegExp('audio(\.min)?\.js.*'),
        scripts = document.getElementsByTagName('script');
    for (var i = 0, ii = scripts.length; i < ii; i++) {
      var path = scripts[i].getAttribute('src');
      if(re.test(path)) return path.replace(re, '');
    }
  })();
  
  // ##The audiojs interface
  // This is the global object which provides an interface for creating new `audiojs` instances.
  // It also stores all of the construction helper methods and variables.
  container[audiojs] = {
    instanceCount: 0,
    instances: {},
    // The markup for the swf. It is injected into the page if there is not support for the `<audio>` element. The `$n`s are placeholders.  
    // `$1` The name of the flash movie  
    // `$2` The path to the swf  
    // `$3` Cache invalidation  
    flashSource: '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ' +
        'id="$1" width="1" height="1" name="$1" style="position: absolute; ' +
        'left: -1px;"><param name="movie" value="$2?playerInstance=' + audiojs +
        '.instances[\'$1\']&datetime=$3"><param name="allowscriptaccess"' +
        'value="always"><embed name="$1" src="$2?playerInstance=' + audiojs +
        '.instances[\'$1\']&datetime=$3" width="1" height="1" allowscriptaccess' + 
        '="always"></object>',

    // ### The main settings object
    // Where all the default settings are stored. Each of these variables and methods can be overwritten by the user-provided `options` object.
    settings: {
      autoplay: false,
      loop: false,
      preload: true,
      imageLocation: '',
      swfLocation: '/audiojs/audiojs.swf',
      useFlash: (function() {
        var a = document.createElement('audio');
        return !(a.canPlayType && a.canPlayType('audio/mpeg;').replace(/no/, ''));
      })(),
      hasFlash: (function() {
        if (navigator.plugins && navigator.plugins.length && navigator.plugins['Shockwave Flash']) {
          return true;
        } else if (navigator.mimeTypes && navigator.mimeTypes.length) {
          var mimeType = navigator.mimeTypes['application/x-shockwave-flash'];
          return mimeType && mimeType.enabledPlugin;
        } else {
          try {
            var ax = new ActiveXObject('ShockwaveFlash.ShockwaveFlash');
            return true;
          } catch (e) {}
        }
        return false;
      })(),
      // The default markup and classes for creating the player:
      createPlayer: {
        markup: '<div class="play-pause unselectable">' +
          '    <p class="play"></p>' +
          '    <p class="pause"></p>' +
          '    <p class="loading"></p>' +
          '</div>' +
          '<div class="skip unselectable" title="Skip back 15 seconds.">' +
          '    <span class="glyphicon glyphicon-repeat flip-glyph" aria-hidden="true"></span>' +
          '</div>' +
          '<div class="scrubber">' +
          '    <div class="progress"></div>' +
          '    <div class="loaded"></div>' +
          '</div>' +
          '<div class="skip unselectable" title="Skip ahead 30 seconds.">' +
          '    <span class="glyphicon glyphicon-repeat" aria-hidden="true"></span>' +
          '</div>' +
          '<div class="time unselectable">' +
          '    <span><em class="played">000:00</em></span>' +
          '    <div class="slider"></div>' +
          '</div>' +
          '<div class="volume unselectable" selectable="no">' +
          '    <span class="glyphicon glyphicon-volume-off" aria-hidden="true"></span>' +
          '    <span class="glyphicon glyphicon-volume-down" aria-hidden="true"></span>' +
          '    <span class="glyphicon glyphicon-volume-up" aria-hidden="true"></span>' +
          '</div>',
        playPauseClass: 'play-pause',
        scrubberClass: 'scrubber',
        progressClass: 'progress',
        loaderClass: 'loaded',
        timeClass: 'time',
        durationClass: 'duration',
        playedClass: 'played',
        errorMessageClass: 'error-message',
        playingClass: 'playing',
        loadingClass: 'loading',
        errorClass: 'error'
      },
      // The css used by the default player. This is is dynamically injected into a `<style>` tag in the top of the head.
      css: '',
      // The default event callbacks:
      trackEnded: function(e) {},
      flashError: function() {
        var player = this.settings.createPlayer,
            html = 'Missing <a href="http://get.adobe.com/flashplayer/">flash player</a> plugin.';
        //if (this.mp3) html += ' <a href="'+this.mp3+'">Download audio file</a>.';
        throw new Error(html);
      },
      loadError: function(e) {
        var player = this.settings.createPlayer;
        throw new Error('Error loading: "'+this.mp3+'"');
      },
      init: function() {
        var player = this.settings.createPlayer;
        container[audiojs].helpers.addClass(this.wrapper, player.loadingClass);
      },
      loadStarted: function() {
        var player = this.settings.createPlayer;
        container[audiojs].helpers.removeClass(this.wrapper, player.loadingClass);
      },
      loadProgress: function(percent) {
        var player = this.settings.createPlayer,
            scrubber = getByClass(player.scrubberClass, this.wrapper),
            loaded = getByClass(player.loaderClass, this.wrapper);
        loaded.style.width = (scrubber.offsetWidth * percent) + 'px';
      },
      playPause: function() {
        if (this.playing) this.settings.play();
        else this.settings.pause();
{'fraction_non_alphanumeric': 0.1549928008808334, 'fraction_numerical': 0.010671635470483611, 'mean_word_length': 2.4955595026642983, 'pattern_counts': {'":': 0, '<': 107, '<?xml version=': 0, '>': 105, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '906284', 'n_tokens_mistral': 3522, 'n_tokens_neox': 3430, 'n_words': 880}