<commit_before>//Main JS file
var gQuery = require('libs/gquery/dist/gquery.min.js'),
    UTIL = require('./util.js'),
    TweenLite = require('libs/TweenLite.js'),
    TimelineLite = require('libs/TimelineLite.js'),
    CSSPlugin = require('libs/CSSPlugin.js');
//You can use $('.class').selector or $('#id').selector for
//jQuery-like workflow. $.each(selector, callback), $.css({Object}),
//$.on(eventType, callback). Greensock TweenLite and TimelineLite
//are also included.
var Animations = (function () {
    'use strict';

    var timeline,            // Main Animation that hold the child animations
        variant,            // style... mpu / leaderboard etc
        elements = {},         // Home of all of the DOM Node Elements
        backgrounds = {};    // Just another handy container

    // Construct
    function Animations () {

    }

    // This creates all of our animation elements
    Animations.prototype.assign = function () {
        elements.ad                     = $('.ad').selector;
        elements.frame1                 = $('#scene-1').selector;
        elements.frame2                 = $('#scene-2').selector;
        elements.frame3                 = $('#scene-3').selector;
        elements.endframe               = $('#endframe').selector;
        elements.first                  = $('#element-1').selector;
        elements.second                 = $('#element-2').selector;
        elements.third                  = $('#element-3').selector;
        elements.fourth                 = $('#element-4').selector;
        elements.cta                    = $('#cta').selector;
        elements.logo                   = $('#logo').selector;

        this.construct();
    };

    // This creates all of our animation elements
    Animations.prototype.construct = function () {
        var durationZoomIn      = 1,
            durationZoomOut     = 1,
            durationFadeIn      = 1,
            durationFadeOut     = 1,
            durationMove        = 0.5,
            durationSwipe       = 0.6,
            durationPan         = 4,
            pauseDuration       = 2;

        // create a home for our animations
        // timeline = new TimelineLite( {onComplete:this.onFinish, onCompleteParams:["test1", "test2"], onCompleteScope:this } );
        timeline = new TimelineLite();

        var main = new TimelineLite();
        // Frame # 1 -------------------------------------------------------------------------
        // main animation goes here, cuz
        main.to(elements.frame1, durationFadeIn, {autoAlpha: 1}, 0.5);


        // Create timeline
        timeline.add(main);

        // wait before starting the animation!
        timeline.pause();
    };

    // This Kicks off the animation on screen
    Animations.prototype.onFinish = function (scope) {

    };

    Animations.prototype.begin = function () {
        // hide loader!
        // remove loading class from #content
        UTIL.removeClass(elements.ad , 'loading');
        timeline.play();
    };

    return Animations;
})();

window.onload = function () {
    var anim = new Animations();
    var clickTag = window.clickThrough;

    anim.assign();
    anim.begin();

    if (!UTIL.environment.isMobile()) {
        // Desktop-specific events
    } else {
        // Mobile Specific Events
    }

    //UNCOMMENT IF ADBUILDER
    // //Ad Buider
    // if (dealerTag.length > 20 && dealerTag.length <= 35) {
    //     $('#dealer-name').css({
    //         'font-size': '1.6em',
    //         'width': '50%',
    //         'line-height': '1.1em',
    //         'margin-top': '-1em'
    //     });
    // } else if (dealerTag.length > 35){
    //     $('#dealer-name').css({
    //         'font-size': '1.1em',
    //         'line-height': '1.2em',
    //         'margin-top': '-0.5em',
    //         'width': '50%'
    //     });
    // }
    // //set the text
    // $('#dealer-name').selector.innerHTML = dealerTag;

    $('.ad').on('click', function() {
        window.open(clickTag, '_blank');
    });
};<commit_msg>clean up index.js<commit_after>//Main JS file
var gQuery = require('libs/gquery/dist/gquery.min.js'),
    UTIL = require('./util.js'),
    TweenLite = require('libs/TweenLite.js'),
    TimelineLite = require('libs/TimelineLite.js'),
    CSSPlugin = require('libs/CSSPlugin.js');
//You can use $('.class').selector or $('#id').selector for
//jQuery-like workflow. $.each(selector, callback), $.css({Object}),
//$.on(eventType, callback). Greensock TweenLite and TimelineLite
//are also included.
var Animations = (function () {
    'use strict';

    var timeline,            // Main Animation that hold the child animations
        variant,            // style... mpu / leaderboard etc
        elements = {},         // Home of all of the DOM Node Elements
        backgrounds = {};    // Just another handy container

    // Construct
    function Animations () {}

    // This creates all of our animation elements
    Animations.prototype.assign = function () {
        elements.ad                     = $('.ad').selector;
        elements.frame1                 = $('#scene-1').selector;
        elements.frame2                 = $('#scene-2').selector;
        elements.frame3                 = $('#scene-3').selector;
        elements.endframe               = $('#endframe').selector;
        elements.first                  = $('#element-1').selector;
        elements.second                 = $('#element-2').selector;
        elements.third                  = $('#element-3').selector;
        elements.fourth                 = $('#element-4').selector;
        elements.cta                    = $('#cta').selector;
        elements.logo                   = $('#logo').selector;

        this.construct();
    };

    // This creates all of our animation elements
    Animations.prototype.construct = function () {
        var durationZoomIn      = 1,
            durationZoomOut     = 1,
            durationFadeIn      = 1,
            durationFadeOut     = 1,
            durationMove        = 0.5,
            durationSwipe       = 0.6,
            durationPan         = 4,
            pauseDuration       = 2;

        // create a home for our animations
        // example: timeline complete parameters:
        // timeline = new TimelineLite( {onComplete:this.onFinish, onCompleteParams:["test1", "test2"], onCompleteScope:this } );
        timeline = new TimelineLite();

        var main = new TimelineLite();
        // Frame # 1 -------------------------------------------------------------------------
        // main animation goes here, cuz
        main.to(elements.frame1, durationFadeIn, {autoAlpha: 1}, 0.5);

        // Create timeline
        timeline.add(main);

        // wait before starting the animation!
        timeline.pause();
    };

    // This Kicks off the animation on screen
    Animations.prototype.onFinish = function (scope) {};

    Animations.prototype.begin = function () {
        // hide loader!
        // remove loading class from #content
        UTIL.removeClass(elements.ad , 'loading');
        timeline.play();
    };

    return Animations;
})();

window.onload = function () {
    var anim = new Animations();
    var clickTag = window.clickThrough;


    anim.assign();
    anim.begin();

    if (!UTIL.environment.isMobile()) {
        // Desktop-specific events
    } else {
        // Mobile Specific Events
    }

    //UNCOMMENT IF ADBUILDER
    // //Ad Buider
    // var dealerTag = window.dealerName;
    // if (dealerTag.length > 20 && dealerTag.length <= 35) {
    //     $('#dealer-name').css({
    //         'font-size': '1.6em',
    //         'width': '50%',
    //         'line-height': '1.1em',
    //         'margin-top': '-1em'
    //     });
    // } else if (dealerTag.length > 35){
    //     $('#dealer-name').css({
    //         'font-size': '1.1em',
    //         'line-height': '1.2em',
    //         'margin-top': '-0.5em',
    //         'width': '50%'
    //     });
    // }
    // //set the text
    // $('#dealer-name').selector.innerHTML = dealerTag;

    $('.ad').on('click', function() {
        window.open(clickTag, '_blank');
    });
};
{'fraction_non_alphanumeric': 0.16813079551000487, 'fraction_numerical': 0.01171303074670571, 'mean_word_length': 1.6163421640600064, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '7624456', 'n_tokens_mistral': 2304, 'n_tokens_neox': 2208, 'n_words': 517}