<commit_before>/**
 * JavaScript for luzmcosta.com
 *
 * @author <NAME> <<EMAIL>>
 * @updated 11.30.2014
 * @version 0.1
 */

"use strict";

var Tracker, Phrases;

Tracker = {
    initialize: function() {
        // Bind methods to events.
        $( "#email" ).click( this.email );
        $( "#linkedin" ).click( this.linkedin );
        $( "#twitter" ).click( this.twitter );
    },
    email: function() {
        this.send( "contact", "click", "Email" );
    },
    linkedin: function() {
        this.send( "social", "go", "LinkedIn" );
    },
    twitter: function() {
        this.send( "social", "go", "Twitter" );
    },
    send: function( category, action, label ) {
        var ga = ga || {};

        ga( "send", "event", category, action, label );
    }
};

Phrases = {
    el: $( "#summary" ),
    initialize: function() {
        // Set content to scroll.
        this.scroll();

        // Set click events on options.
        this.setOptions();
    },
    /**
     * Toggles the options in and out of view.
     */
    animate: function( el, classes ) {
        // Toggle options in/out of view.
        $( el ).toggleClass( classes );
    },
    setOptions: function() {
        // Set click events on play option.
        $( ".fa-play" )
            .off()
            .on( "click", this.play.call( this, true ) );

        // Set click events on pause option.
        $( ".fa-pause" )
            .off()
            .on( "click", this.stop.bind( this ) )
            .on( "click", this.togglePlay );

        // Set event on list option
        $( ".list" ).off().on( "click", this.list.bind( this ) );
    },
    /**
     * Toggle the pause/play button's icon and functionality.
     */
    togglePlay: function( play, pause ) {
        // Set classes on the view.
        $( ".play" )
            .toggleClass( "fa-pause", pause )
            .toggleClass( "fa-play", play );
    },
    /**
     * Toggles the options in and out of view.
     */
    options: function() {
        console.log("OPTIONS");
        // Toggle options in/out of view.
        this.animate( "#options", "visuallyhidden" );
    },
    /**
     * Stores the return value of the interval.
     */
    interval: 0,
    /**
     * Stores the state of the view.
     */
    playing: false,
    /**
     * Toggles between the pause and play buttons.
     */
    play: function( start ) {
        console.log("PLAY", start );
        // If starting event, set pause button.
        // If stopping event, set play button.
        var pause = ( start ? true : false ),
            play = ( !start ? true : false );

        // Set classes on the view.
        this.togglePlay( play, pause );

        // Set the view's state;
        this.playing = start;

        return this.playing;
    },
    /**
     * Stop the interval counter from continuing.
     */
    stop: function( e ) {
        console.log("STOP", e );
        // Set method to execute at set interval.
        clearInterval( this.interval );

        // Set the view's state;
        this.playing = false;

        // If starting...
        if ( $( ".play" ).is( ".fa-play" ) ) {
            // Set the view to update at intervals.
            this.scroll();
        }

        // Set random phrase on view.
        return true;
    },
    /**
     * Updates the view every 2 seconds with a new phrase.
     */
    scroll: function() {
        // Set method to execute at set interval.
        // Save the return value to this.interval.
        this.interval = setInterval( this.render.bind( this ), 2000 );

        // Return setInterval's return value.
        return this.interval;
    },
    /**
     * Saves state.
     */
    save: function( i ) {
        this.current = i || 0;
    },
    /**
     * The index of the current phrase in the view.
     */
    current: 0,
    /**
     * List of phrases.
     *
     * @todo Replace with a data storage solution.
     */
    phrases: {
        default: "designs user experiences.",
        apps: "builds proprietary web applications.",
        bloat: "likes cleaning up bloated websites in her free time",
        freeTime: "jokes about having free time",
        style: "is inspired by Bauhaus",
        sites: "designs websites.",
        designui: "designs user interfaces.",
        users: "is getting to know her users.",
        staging: "always stages on the production server.",
        cli: "doesn't mind writing shell scripts.",
        gplus: "has a <a href='https://plus.google.com/+LuzMCosta/posts'>Google+ page</a>, kinda...</a>",
        facebook: "remembers when Facebook still posted statuses in the third-person",
        opensource: "<i class='fa fa-heart'></i>s open source.",
        js: "<i class='fa fa-heart'></i>s JavaScript.",
        sourceCode: "reads source code over morning coffee",
        requirejs: "uses RequireJS.",
        grunt: "uses Grunt.",
        backbone: "uses Backbone.",
        jquery: "uses jQuery.",
        qunit: "uses QUnit.",
        bodhi: "has a cat named Bodhi.",
        scrolling: "thought to herself, \" I better give these people a button that appears on hover to stop this scrolling.\"",<commit_msg>Edits content.<commit_after>/**
 * JavaScript for luzmcosta.com
 *
 * @author <NAME> <<EMAIL>>
 * @updated 11.30.2014
 * @version 0.1
 */

"use strict";

var Tracker, Phrases;

Tracker = {
    initialize: function() {
        // Bind methods to events.
        $( "#email" ).click( this.email );
        $( "#linkedin" ).click( this.linkedin );
        $( "#twitter" ).click( this.twitter );
    },
    email: function() {
        this.send( "contact", "click", "Email" );
    },
    linkedin: function() {
        this.send( "social", "go", "LinkedIn" );
    },
    twitter: function() {
        this.send( "social", "go", "Twitter" );
    },
    send: function( category, action, label ) {
        var ga = ga || {};

        ga( "send", "event", category, action, label );
    }
};

Phrases = {
    el: $( "#summary" ),
    initialize: function() {
        // Set content to scroll.
        this.scroll();

        // Set click events on options.
        this.setOptions();
    },
    /**
     * Toggles the options in and out of view.
     */
    animate: function( el, classes ) {
        // Toggle options in/out of view.
        $( el ).toggleClass( classes );
    },
    setOptions: function() {
        // Set click events on play option.
        $( ".fa-play" )
            .off()
            .on( "click", this.play.call( this, true ) );

        // Set click events on pause option.
        $( ".fa-pause" )
            .off()
            .on( "click", this.stop.bind( this ) )
            .on( "click", this.togglePlay );

        // Set event on list option
        $( ".list" ).off().on( "click", this.list.bind( this ) );
    },
    /**
     * Toggle the pause/play button's icon and functionality.
     */
    togglePlay: function( play, pause ) {
        // Set classes on the view.
        $( ".play" )
            .toggleClass( "fa-pause", pause )
            .toggleClass( "fa-play", play );
    },
    /**
     * Toggles the options in and out of view.
     */
    options: function() {
        console.log("OPTIONS");
        // Toggle options in/out of view.
        this.animate( "#options", "visuallyhidden" );
    },
    /**
     * Stores the return value of the interval.
     */
    interval: 0,
    /**
     * Stores the state of the view.
     */
    playing: false,
    /**
     * Toggles between the pause and play buttons.
     */
    play: function( start ) {
        console.log("PLAY", start );
        // If starting event, set pause button.
        // If stopping event, set play button.
        var pause = ( start ? true : false ),
            play = ( !start ? true : false );

        // Set classes on the view.
        this.togglePlay( play, pause );

        // Set the view's state;
        this.playing = start;

        return this.playing;
    },
    /**
     * Stop the interval counter from continuing.
     */
    stop: function( e ) {
        console.log("STOP", e );
        // Set method to execute at set interval.
        clearInterval( this.interval );

        // Set the view's state;
        this.playing = false;

        // If starting...
        if ( $( ".play" ).is( ".fa-play" ) ) {
            // Set the view to update at intervals.
            this.scroll();
        }

        // Set random phrase on view.
        return true;
    },
    /**
     * Updates the view every 2 seconds with a new phrase.
     */
    scroll: function() {
        // Set method to execute at set interval.
        // Save the return value to this.interval.
        this.interval = setInterval( this.render.bind( this ), 2000 );

        // Return setInterval's return value.
        return this.interval;
    },
    /**
     * Saves state.
     */
    save: function( i ) {
        this.current = i || 0;
    },
    /**
     * The index of the current phrase in the view.
     */
    current: 0,
    /**
     * List of phrases.
     *
     * @todo Replace with a data storage solution.
     */
    phrases: {
        default: "designs user experiences.",
        apps: "builds proprietary web applications.",
        bloat: "likes cleaning up bloated websites in her free time",
        freeTime: "jokes about having free time",
        style: "is inspired by Bauhaus",
        sites: "designs websites.",
        designui: "designs user interfaces.",
        users: "is getting to know her users.",
        staging: "always stages on the production server.",
        cli: "doesn't mind writing shell scripts.",
        gplus: "has a <a href='https://plus.google.com/+LuzMCosta/posts'>Google+ page</a>, kinda...</a>",
        facebook: "remembers when Facebook still posted statuses in the third-person",
        opensource: "<i class='fa fa-heart'></i>s open source.",
        js: "<i class='fa fa-heart'></i>s JavaScript.",
        sourceCode: "reads source code over morning coffee",
        requirejs: "uses RequireJS.",
        grunt: "uses Grunt.",
        backbone: "uses Backbone.",
        jquery: "uses jQuery.",
        qunit: "uses QUnit.",
        bodhi: "has a cat named Bodhi.",
        scrolling: "thought to herself, \" I better give users a button to stop this scrolling.\"",
{'fraction_non_alphanumeric': 0.14339732402559627, 'fraction_numerical': 0.0034904013961605585, 'mean_word_length': 1.756547300908605, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 23, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5763876', 'n_tokens_mistral': 3026, 'n_tokens_neox': 2929, 'n_words': 981}