<commit_before>require(["jquery", "/devwidgets/navigation/javascript/navigation.js"], function() {
    History = {
        prev_url : -1,

        history_change : function(e) {
            if (e === undefined) {
                return;
            }
            var url = e.fragment;
            if (url != History.prev_url){ // should be checking individual params, not just the string composition
                if (url){
                    if (sakai_global.sitespages.openPageH) {
                        if ($.bbq.getState("page") === "") {
                            sakai_global.sitespages.openPageH(url);
                        } else {
                            sakai_global.sitespages.openPageH($.bbq.getState("page"));
                        }
                        History.prev_url = url;
                    } else { // is hasn't loaded in yet, so lets try every 10ms, using the jQuery animate version of setTimeout
                        $('html').animate({ borderWidth:0},10, function() {
                            $(window).trigger('hashchange');
                        });
                    }
                } else {
                    sakai_global.sitespages.openPageH();
                    History.prev_url = url;
                }
            }
        },

        addBEvent : function(page, url) {
            var state = {};
            state['page'] = page || "";
            $.bbq.pushState(state);
        }
    };


    require.ready(function() {
          var cache = {
              '': $(".show")
          };

          $(window).bind('hashchange', function(e) {<commit_msg>NOJIRA fixing history handing for sites<commit_after>require(["jquery", "/devwidgets/navigation/javascript/navigation.js"], function() {
    History = {
        prev_url : -1,

        history_change : function(e) {
            if (e === undefined) {
                return;
            }
            var url = e.fragment;
            if (url != History.prev_url){ // should be checking individual params, not just the string composition
                if (url){
                    if (sakai_global.sitespages && sakai_global.sitespages.openPageH) {
                        if ($.bbq.getState("page") === "") {
                            sakai_global.sitespages.openPageH(url);
                        } else {
                            sakai_global.sitespages.openPageH($.bbq.getState("page"));
                        }
                        History.prev_url = url;
                    } else { // is hasn't loaded in yet, so lets try every 10ms, using the jQuery animate version of setTimeout
                        $('html').animate({ borderWidth:0},10, function() {
                            $(window).trigger('hashchange');
                        });
                    }
                } else if (sakai_global.sitespages && sakai_global.sitespages.openPageH) {
                    sakai_global.sitespages.openPageH();
                    History.prev_url = url;
                }
            }
        },

        addBEvent : function(page, url) {
            var state = {};
            state['page'] = page || "";
            $.bbq.pushState(state);
        }
    };


    require.ready(function() {
          var cache = {
              '': $(".show")
          };

          $(window).bind('hashchange', function(e) {
{'fraction_non_alphanumeric': 0.12250966399048469, 'fraction_numerical': 0.003568242640499554, 'mean_word_length': 1.2278145695364238, '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': '5510813', 'n_tokens_mistral': 890, 'n_tokens_neox': 825, 'n_words': 167}