<commit_before>//dont-look-back
//by DOLLOR
~(function(global){
	"use strict";
	var obj,init;
	obj={};
	obj.enable=true
	init=function(){
		//封装改变hash方法
		obj.changeHashTo=function(newhash){
			newhash="#"+newhash;
			if(history && history.pushState){
				if(newhash!=="#"){
					history.pushState({},document.title,newhash);
				}
				else{
					history.pushState({},document.title,
						location.href.split("#")[0]
					);
				}
			}
			else{
				global.location.hash=newhash
			}
		};
		//加倍改变
		obj.changeManyTimes=function(newhash){
			obj.changeHashTo(newhash+"#3");
			obj.changeHashTo(newhash+"#2");
			obj.changeHashTo(newhash+"#1");
			obj.changeHashTo(newhash);
		};
		//保存旧的并设置新的
		obj.setHash=function(newhash){
			obj.lastHash=newhash;
			obj.changeManyTimes(obj.lastHash);
		};
		obj.getHash=function(){
			var hash=global.location.hash;
			if(hash[0]==="#"){
				hash=hash.slice(1);
			}
			return hash;
		};
		//响应并阻止后退
		obj.preventBack=function(){
			//获取改变后的hash
			var newhash = obj.getHash();
			//检查hash是否变了
			if(obj.enable && newhash!==obj.lastHash){
				//检查是后退还是前进
				if(newhash===obj.lastHash+"#1"){
					setTimeout(function(){
						history.go(1);
					},50)
				}
				else{
					obj.setHash(newhash);
				}
			}
		};
		//当前想保持的hash
		obj.lastHash=obj.getHash();

		obj.changeManyTimes(obj.lastHash);
		obj.preventBack();
		if(global.addEventListener){
			global.addEventListener("hashchange",function(ev){
				obj.preventBack();
			});
		}
		else if(global.attachEvent){
			global.attachEvent("onhashchange",function(ev){
				obj.preventBack();
			});
		}
		else{
			//global.onhashchange=obj.preventBack;
		}
	};
	//output
	if(!global.dlb){
		init();
		global.dlb=global.dlb || obj;
	}
})(window);
<commit_msg>Update dlb.js<commit_after>//dont-look-back
//by DOLLOR
~(function(global){
	"use strict";
	var obj,init;
	obj={};
	obj.enable=true
	init=function(){
		//封装改变hash方法
		obj.changeHashTo=function(newhash){
			newhash="#"+newhash;
			if(history && history.pushState){
				if(newhash!=="#"){
					history.pushState({},document.title,newhash);
				}
				else{
					history.pushState({},document.title,
						location.href.split("#")[0]
					);
				}
			}
			else{
				global.location.hash=newhash
			}
		};
		//加倍改变
		obj.changeManyTimes=function(newhash){
			obj.changeHashTo(newhash+"#3");
			obj.changeHashTo(newhash+"#2");
			obj.changeHashTo(newhash+"#1");
			obj.changeHashTo(newhash);
		};
		//保存旧的并设置新的
		obj.setHash=function(newhash){
			obj.lastHash=newhash;
			obj.changeManyTimes(obj.lastHash);
		};
		obj.getHash=function(){
			var hash=global.location.hash;
			if(hash[0]==="#"){
				hash=hash.slice(1);
			}
			return hash;
		};
		//响应并阻止后退
		obj.preventBack=function(){
			//获取改变后的hash
			var newhash = obj.getHash();
			//检查hash是否变了
			if(obj.enable && newhash!==obj.lastHash){
				//检查是后退还是前进
				if(newhash===obj.lastHash+"#1"){
					setTimeout(function(){
						history.go(1);
					},50)
				}
				else{
					obj.setHash(newhash);
				}
			}
		};
		//当前想保持的hash
		obj.lastHash=obj.getHash();

		obj.changeManyTimes(obj.lastHash);
		obj.preventBack();
		if(global.addEventListener){
			global.addEventListener("hashchange",function(ev){
				obj.preventBack();
			});
		}
		else if(global.attachEvent){
			global.attachEvent("onhashchange",function(ev){
				obj.preventBack();
			});
		}
		else{
			//global.onhashchange=obj.preventBack;
		}
	};
	//output
	init();
	// Node.js
	if (typeof module !== 'undefined' && module.exports) {
		module.exports = obj;
	}
	// AMD / RequireJS
	else if (typeof define !== 'undefined' && define.amd) {
		define([], function () {
			return obj;
		});
	}
	// included directly via <script> tag
	//else {
		global.dlb = obj;
	//}
})(window);

{'fraction_non_alphanumeric': 0.18771788683293109, 'fraction_numerical': 0.0053633681952266025, 'mean_word_length': 3.2338251986379114, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, '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': '3245243', 'n_tokens_mistral': 1764, 'n_tokens_neox': 1472, 'n_words': 176}