<commit_before>/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

(function($, Waypoint) {
    'use strict';

    var mozClient = window.Mozilla.Client;
    var impactInnovationWaypoint;
    var $slideshow = $('#home-slideshow');

    function handleWaypoint(target, callback) {
        return function(direction) {
            window.dataLayer.push({
                'event': 'scroll-section',
                'section': target
            });

            if (typeof callback === 'function') {
                callback(direction);
            }
        };
    }

    // Intro slideshow
    function startSlideshow() {
        if ($slideshow.length) {
            $slideshow.cycle({
                fx: 'fade',
                log: false,
                slides: '> .slide',
                speed: 1000,
                startingSlide: 1, // start on group photo
                timeout: 5000
            });
        }
    }

    function enableWaypoints() {
        impactInnovationWaypoint = new Waypoint({
            element: '#who-innovate-wrapper',
            handler: handleWaypoint('impact-innovation'),
            offset: '40%'
        });
    }

    // show mobile download buttons if on mobile platform and not fx
    if (mozClient.isMobile && !mozClient.isFirefox) {
        $('#fxmobile-download-buttons').addClass('visible');
        $('#fx-download-link').addClass('hidden');
    }

    $(function() {
        var mqIsTablet;<commit_msg>[bug 133513] Fix JS error on home page scroll detection<commit_after>/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

(function($, Waypoint) {
    'use strict';

    var mozClient = window.Mozilla.Client;
    var impactInnovationWaypoint;
    var $slideshow = $('#home-slideshow');

    function handleWaypoint(target, callback) {
        return function(direction) {
            window.dataLayer.push({
                'event': 'scroll-section',
                'section': target
            });

            if (typeof callback === 'function') {
                callback(direction);
            }
        };
    }

    // Intro slideshow
    function startSlideshow() {
        if ($slideshow.length) {
            $slideshow.cycle({
                fx: 'fade',
                log: false,
                slides: '> .slide',
                speed: 1000,
                startingSlide: 1, // start on group photo
                timeout: 5000
            });
        }
    }

    function enableWaypoints() {
        impactInnovationWaypoint = new Waypoint({
            element: '#impact-innovate-wrapper',
            handler: handleWaypoint('impact-innovation'),
            offset: '40%'
        });
    }

    // show mobile download buttons if on mobile platform and not fx
    if (mozClient.isMobile && !mozClient.isFirefox) {
        $('#fxmobile-download-buttons').addClass('visible');
        $('#fx-download-link').addClass('hidden');
    }

    $(function() {
        var mqIsTablet;
{'fraction_non_alphanumeric': 0.12136071100214527, 'fraction_numerical': 0.011032791909285933, 'mean_word_length': 1.7993138936535162, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4598372', 'n_tokens_mistral': 951, 'n_tokens_neox': 870, 'n_words': 238}