<commit_before>define('login', ['notification'], function(notification) {

    var requestedLogin = false;
    var readyForReload = false;

    z.doc.bind('login', function(skipDialog) {
        if (readyForReload) {
            window.location.reload();
            return;
        }
        if (skipDialog) {
            startLogin();
        } else {
            $('.overlay.login').addClass('show');
        }
    }).on('click', '.browserid', function(e) {
        if (readyForReload) {
            window.location.reload();
            return;
        }

        var $this = $(this);
        $this.addClass('loading-submit');
        z.doc.on('logincancel', function() {
            $this.removeClass('loading-submit').blur();
        })
        startLogin();
        e.preventDefault();
    });

    function startLogin() {
        requestedLogin = true;
        var forcedIssuer = z.body.data('persona-unverified-issuer');
        var params = {
            termsOfService: '/terms-of-use',
            privacyPolicy: '/privacy-policy',
            oncancel: function() {
                z.doc.trigger('logincancel');
            }
        };
        if (forcedIssuer) {
            console.log('Login is forcing issuer:', forcedIssuer);
            params.experimental_forceIssuer = forcedIssuer;
        }
        navigator.id.request(params);
    }

    z.body.on('click', '.logout', function() {
        // NOTE: Real logout operations happen on the action of the Logout
        // link/button. This just tells Persona to clean up its data.
        if (navigator.id) {
            navigator.id.logout();
        }<commit_msg>use persona siteLogo parameter in zamboni land (bug 892719)<commit_after>define('login', ['notification'], function(notification) {

    var requestedLogin = false;
    var readyForReload = false;

    z.doc.bind('login', function(skipDialog) {
        if (readyForReload) {
            window.location.reload();
            return;
        }
        if (skipDialog) {
            startLogin();
        } else {
            $('.overlay.login').addClass('show');
        }
    }).on('click', '.browserid', function(e) {
        if (readyForReload) {
            window.location.reload();
            return;
        }

        var $this = $(this);
        $this.addClass('loading-submit');
        z.doc.on('logincancel', function() {
            $this.removeClass('loading-submit').blur();
        })
        startLogin();
        e.preventDefault();
    });

    function startLogin() {
        requestedLogin = true;
        var forcedIssuer = document.body.dataset.personaUnverifiedIssuer;
        var mediaUrl = document.body.dataset.mediaUrl;
        if (mediaUrl.indexOf('https:') === -1) {
            mediaUrl = 'https://marketplace.cdn.mozilla.net/media';
        }
        var params = {
            siteLogo: mediaUrl + '/img/mkt/logos/128.png?siteLogo',
            termsOfService: '/terms-of-use',
            privacyPolicy: '/privacy-policy',
            oncancel: function() {
                z.doc.trigger('logincancel');
            }
        };
        if (forcedIssuer) {
            console.log('Login is forcing issuer:', forcedIssuer);
            params.experimental_forceIssuer = forcedIssuer;
        }
        navigator.id.request(params);
    }

    z.body.on('click', '.logout', function() {
        // NOTE: Real logout operations happen on the action of the Logout
        // link/button. This just tells Persona to clean up its data.
        if (navigator.id) {
            navigator.id.logout();
        }
{'fraction_non_alphanumeric': 0.1371396585502379, 'fraction_numerical': 0.00279876854184159, 'mean_word_length': 1.8523543495610535, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 1, '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': '7620590', 'n_tokens_mistral': 1007, 'n_tokens_neox': 986, 'n_words': 197}