<commit_before>(function (register, dispatch, __morgen) {

    // Register a new global event, to be binded to all
    // the elements containing `[data-push]`.
    __morgen.events = {
        'click [data-push]': function (e) {
            var href = e.target.attributes.href.value;

            window.history.pushState({ href: href }, '', href);
            dispatch('route', { href: href });

            e.preventDefault();
        }
    };


    // Register a new controller to manage the History API.
    register('__morgen_history', function (c) {

        c.events = {
            '_scope': window,

            'popstate': function (e) {
                if (e.state)
                    dispatch('route', e.state);
                else
                    console.warn('[history] dropping routing with empty state');
            }
        };

    });

}) (window.morgen.register,
    window.morgen.dispatch,
    window.__morgen);
<commit_msg>restore history api, forgot to set controller to ready<commit_after>(function (register, dispatch, __morgen) {

    // Register a new global event, to be binded to all
    // the elements containing `[data-push]`.
    __morgen.events = {
        'click [data-push]': function (e) {
            var href = e.target.attributes.href.value;

            window.history.pushState({ href: href }, '', href);
            dispatch('route', { href: href });

            e.preventDefault();
        }
    };


    // Register a new controller to manage the History API.
    register('__morgen_history', function (c) {

        c.events = {
            '_scope': window,

            'popstate': function (e) {
                if (e.state)
                    dispatch('route', e.state);
                else
                    console.warn('[history] dropping routing with empty state');
            }
        };

        c.ready();
    });

}) (window.morgen.register,
    window.morgen.dispatch,
    window.__morgen);

{'fraction_non_alphanumeric': 0.12983706720977597, 'fraction_numerical': 0.0, 'mean_word_length': 1.7482517482517483, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2821387', 'n_tokens_mistral': 556, 'n_tokens_neox': 519, 'n_words': 141}