<commit_before>(function (window, $, audiojs) {
    'use strict';
    
    $.fn.addPlayer = function (preload) {
        var p;
        if ($(this).length !== 1) {
            throw new Error('Cannot instantiate player on ' +
                            'multiple/null selector');
        }
        if (!$(this).data('js-player')) {
            p = new Player($(this), preload);
            $(this).data('js-player', p);
            $(document).keydown(function (e) {
                var disable = true;
                if (!$(e.target).is('input')) {
                    if (e.which === 32) p.playPause(); 
                    else if (e.which === 38) p.prevTrack();
                    else if (e.which === 40) p.nextTrack();
                    else if (e.which === 37) p.skipBack(15);
                    else if (e.which === 39) p.skipAhead(30);
                    else if (e.which === 77) p.toggleMute(); 
                    else if (e.which === 187) p.incVol(); 
                    else if (e.which === 189) p.decVol();
                    else if (e.which === 67) p.toggleCont();
                    else if (e.which === 82) p.toggleRep(); 
                    else if (e.which === 83) {
                        if (window.PageStack.getPage() !== 'index') {
                            window.PageStack.load('index', false, '/');
                        }
                        $('#podcast-search-input').focus();
                    }
                    else disable = false;
                    if (disable) e.preventDefault();
                }
            });
        }
        return $(this).data('js-player');
    };
    
    var Track = function (src, title, p_title, dur, poster_src, pod_id, date, last_pos, played) {
        return {
            src: src,
            title: title,
            duration: dur,
            poster: poster_src,
            podcast: Number(pod_id),
            p_title: p_title,
            date: date,
            last_pos: (last_pos) ? last_pos : 0,
            played: (played) ? played : false
        };
    };

    var TrackElement = function (track) {
        var el = $('<li><div class="pl-btn-del">' +
                   '<span aria-hidden="true"' +
                   ' class="glyphicon glyphicon-remove-sign"></span></div>' +
                   '<div class="t-poster">' +
                   '  <img src="' + track.poster + '">' +
                   '</div><div class="t-title">' + track.title +
                   '</div></li>');
        return el;       
    };
    
    var PlayMode = {
        continue: 0x01,
        repeat: 0x02
    };

    var Player = function (parentElement, preload) {
        if (!preload) preload = {opts: {}, cPtr: 0, cTime: 0, list []};
        var lcount = preload.list.length;
        var P = {
            _dom: $('<div class="player-container"></div>'),
            _rep: (preload.opts.repeat) ? preload.opts.repeat : false,
            _cont: (preload.opts.cont) ? preload.opts.cont : false,
            header: new Header(),
            audio: new AudioPlayer(),
            playlist: new PlayList(preload.list),
            States: {
                play: 'p-play',
                pause: 'p-pause',
                load: 'p-load',
                error: 'p-error'
            },
            
            init: function (preload) {
                this.header.init();
                this.playlist.init(preload.list);
                this.audio.init(this, preload.opts.vol);
                this._dom.find('.player-list ol').click(function (e) {
                    var li = ($(e.target).is('li')) ? $(e.target) :
                            $(e.target).closest('li'),
                        index = li.index(),
                        div = ($(e.target).is('div'))? $(e.target) :
                            $(e.target).closest('div');
                    if (div.hasClass('pl-btn-del')) {
                        P.delete(index);
                    }<commit_msg>[Fix] Typo<commit_after>(function (window, $, audiojs) {
    'use strict';
    
    $.fn.addPlayer = function (preload) {
        var p;
        if ($(this).length !== 1) {
            throw new Error('Cannot instantiate player on ' +
                            'multiple/null selector');
        }
        if (!$(this).data('js-player')) {
            p = new Player($(this), preload);
            $(this).data('js-player', p);
            $(document).keydown(function (e) {
                var disable = true;
                if (!$(e.target).is('input')) {
                    if (e.which === 32) p.playPause(); 
                    else if (e.which === 38) p.prevTrack();
                    else if (e.which === 40) p.nextTrack();
                    else if (e.which === 37) p.skipBack(15);
                    else if (e.which === 39) p.skipAhead(30);
                    else if (e.which === 77) p.toggleMute(); 
                    else if (e.which === 187) p.incVol(); 
                    else if (e.which === 189) p.decVol();
                    else if (e.which === 67) p.toggleCont();
                    else if (e.which === 82) p.toggleRep(); 
                    else if (e.which === 83) {
                        if (window.PageStack.getPage() !== 'index') {
                            window.PageStack.load('index', false, '/');
                        }
                        $('#podcast-search-input').focus();
                    }
                    else disable = false;
                    if (disable) e.preventDefault();
                }
            });
        }
        return $(this).data('js-player');
    };
    
    var Track = function (src, title, p_title, dur, poster_src, pod_id, date, last_pos, played) {
        return {
            src: src,
            title: title,
            duration: dur,
            poster: poster_src,
            podcast: Number(pod_id),
            p_title: p_title,
            date: date,
            last_pos: (last_pos) ? last_pos : 0,
            played: (played) ? played : false
        };
    };

    var TrackElement = function (track) {
        var el = $('<li><div class="pl-btn-del">' +
                   '<span aria-hidden="true"' +
                   ' class="glyphicon glyphicon-remove-sign"></span></div>' +
                   '<div class="t-poster">' +
                   '  <img src="' + track.poster + '">' +
                   '</div><div class="t-title">' + track.title +
                   '</div></li>');
        return el;       
    };
    
    var PlayMode = {
        continue: 0x01,
        repeat: 0x02
    };

    var Player = function (parentElement, preload) {
        if (!preload) preload = {opts: {}, cPtr: 0, cTime: 0, list: []};
        var lcount = preload.list.length;
        var P = {
            _dom: $('<div class="player-container"></div>'),
            _rep: (preload.opts.repeat) ? preload.opts.repeat : false,
            _cont: (preload.opts.cont) ? preload.opts.cont : false,
            header: new Header(),
            audio: new AudioPlayer(),
            playlist: new PlayList(preload.list),
            States: {
                play: 'p-play',
                pause: 'p-pause',
                load: 'p-load',
                error: 'p-error'
            },
            
            init: function (preload) {
                this.header.init();
                this.playlist.init(preload.list);
                this.audio.init(this, preload.opts.vol);
                this._dom.find('.player-list ol').click(function (e) {
                    var li = ($(e.target).is('li')) ? $(e.target) :
                            $(e.target).closest('li'),
                        index = li.index(),
                        div = ($(e.target).is('div'))? $(e.target) :
                            $(e.target).closest('div');
                    if (div.hasClass('pl-btn-del')) {
                        P.delete(index);
                    }
{'fraction_non_alphanumeric': 0.15674653215636822, 'fraction_numerical': 0.009583858764186633, 'mean_word_length': 1.2104236343366779, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 29, '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': '748279', 'n_tokens_mistral': 2332, 'n_tokens_neox': 2169, 'n_words': 479}