<commit_before>var History = {

	history_cur : -1,
	readyForReload : false,

	historyChange : function(newLocation, historyData) {
		History.checkChange();
	},

	checkChange : function(){
		var str = "" + document.location;
		var hashIndex = str.indexOf("#");
		var ourarg = 1;
		if (hashIndex != -1){
			var hashString = str.substring(hashIndex + 1);
			var hashInt = parseInt(hashString);
			if (hashString == "" || hashInt == -1){
				hashInt = 1;
			}
			ourarg = hashInt;
		}
	},

	history_change : function(){
		var str = "" + document.location;
		var hashIndex = str.indexOf("#");
		var ourarg = "";
		if (hashIndex != -1){
			var hashString = str.substring(hashIndex + 1);
			ourarg = hashString;
		}
		if (ourarg != History.history_cur){
			History.history_cur = ourarg;
			if (ourarg){
				sakai.site.openPageH(ourarg);
			} else {
				sakai.site.openPageH();
			}
		}
		setTimeout("History.history_change()",100);
	}, 

	addBEvent: function(id){

		var a = new Array();
		a[0] = "" + id;
		a[1] = "" + id;
		dhtmlHistory.add(a[0],a[1]);

	}

}

window.dhtmlHistory.create({debugMode: false});

window.onload = function() {
	dhtmlHistory.initialize();
	dhtmlHistory.addListener(History.historyChange);
};<commit_msg>SAK-15773<commit_after>var History = {

	history_cur : -1,
	readyForReload : false,

	historyChange : function(newLocation, historyData) {
		History.checkChange();
	},

	checkChange : function(){
		var str = "" + document.location;
		var hashIndex = str.indexOf("#");
		var ourarg = 1;
		if (hashIndex != -1){
			var hashString = str.substring(hashIndex + 1);
			var hashInt = parseInt(hashString);
			if (hashString == "" || hashInt == -1){
				hashInt = 1;
			}
			ourarg = hashInt;
		}
	},

	history_change : function(){
		var str = "" + document.location;
		var hashIndex = str.indexOf("#");
		var ourarg = "";
		if (hashIndex != -1){
			var hashString = str.substring(hashIndex + 1);
			ourarg = hashString;
		}
		if (ourarg != History.history_cur){
			History.history_cur = ourarg;
			if (ourarg){
				sakai.site.openPageH(ourarg);
			} else {
				sakai.site.openPageH();
			}
		}
		setTimeout("History.history_change()",100);
	}, 

	addBEvent: function(id){

		var a = new Array();
		a[0] = "" + id;
		a[1] = "" + id;
		dhtmlHistory.add(a[0],a[1]);

	}

}

//window.dhtmlHistory.create({debugMode: false});

window.onload = function() {
	dhtmlHistory.initialize();
	dhtmlHistory.addListener(History.historyChange);
};
{'fraction_non_alphanumeric': 0.1710204081632653, 'fraction_numerical': 0.014285714285714285, 'mean_word_length': 3.489010989010989, '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': '6718888', 'n_tokens_mistral': 1007, 'n_tokens_neox': 879, 'n_words': 172}