<commit_before>"use strict";

//~ pwnyFilters.js | Dynamic css filters
//~ <NAME> | ponyhacks.com
//~ Enjoy the zonderful ZTF licence

//~ calling cookies:
//~ You can call only this code to set the filters
//~ on any page of the domain
function gtCk(name){
	var re = new RegExp(name + "=([^;]+)");
	var value = re.exec(document.cookie);
return (value != null) ? unescape(value[1]) : null;
}
document.addEventListener("DOMContentLoaded", function(event) {
	console.log("ponyFilters loaded!\n");
	document.documentElement.style.cssText = gtCk('ponyFilters');
});
// End of cookie call

// Bar vars
var hdump="";
hdump += "<meta charset=\"UTF8\"><form style=\"font-size:13px;vertical-align:bottom;margin:0;padding:0\"><span style='font-size:12px'>🐴 </span>";
hdump += "<label>Brightness<input type=\"checkbox\" id=\"radBright\" title=\"Brightness\" data-current=\"1\" style=\"cursor:pointer\"><label>";
hdump += "<label>Gray<input type=\"checkbox\" id=\"radGray\" title=\"Grayscale\" data-current=\"0\" style=\"cursor:pointer\"><label>";
hdump += "<label>Hue<input type=\"checkbox\" id=\"radHR\" title=\"Hue Rotate\" data-current=\"0deg\" style=\"cursor:pointer\"><\/label>";
hdump += "<\/form><strong>";
hdump += "<a onclick=\"document.documentElement.style='filter:invert(0%);-webkit-filter:invert(0%)'\" href=\"javascript:void(0)\" style=\"font-size:22px;text-decoration:none;vertical-align: top;color:#111111;outline:0\">&#9728;<\/a><\/strong> 		  ";
hdump += "  <form style=\"display:inline;border:0;vertical-align:middle;outline:0\" onchange=\"pwnyFilters()\">";
hdump += "<input style=\"display:inline;border:0;vertical-align:middle;outline:0\" type=\"range\" min=\"0\" max=\"100\" step=\"1\" id=\"inVal\" data-current=\"00\">";
hdump += "<\/form><strong>";
hdump += "<a onclick=\"document.documentElement.style='filter:invert(100%);-webkit-filter:invert(100%)'\" href=\"javascript:void(0)\" style=\"font-size:13px;text-decoration:none;color:#111111;vertical-align:middle;outline:0\">&#127762; <\/a><\/strong><strong><big>";
hdump += "<span id=\"valBox\">";
hdump += "<\/span><\/big><\/strong>";
hdump += "<form style=\"display:inline;font-size:13px;margin:0\">";
hdump += "<label><input type=\"checkbox\" id=\"radInvert\" checked title=\"Invert\" data-current=\"0\" style=\"cursor:pointer\">Invert<\/label>";
hdump += "<label><input type=\"checkbox\" id=\"radSepia\" checked title=\"Sepia\" data-current=\"0\" style=\"cursor:pointer\">Sepia<label>";
hdump += "<label><input type=\"checkbox\" id=\"radSaturate\" checked title=\"Saturate\" data-current=\"0\" style=\"cursor:pointer\">Saturation<label>			 ";
hdump += "<big><bold><span id=\"lock\" onclick=\"writeCookie();this.style.color='yellowgreen';this.innerHTML='✓'\" title=\"Save settings in a cookie\">&nbsp;&#x1F512;</span><\/bold><\/big><\/form>";

// Inject
var pwnyBar = document.createElement("div");
    pwnyBar.id = "pwny";
    pwnyBar.innerHTML = hdump;
    pwnyBar.style = "position:absolute;top:46px;left:0px;width:100%;height:30px;font-size:13px;background-color:#DEDEDE;color:#111111;z-index:999;text-align:center";
    console.log(pwnyBar);
var pwnyStyle = document.createElement("style");   
    pwnyStyle.innerHTML = "#pwny{vertical-align:top;margin:0;display:inline;padding:0}input{vertical-align:middle}#valBox{color:grey;font-size:0.8em}#lock{cursor:pointer;font-size:1.13em}";
document.getElementsByTagName("body")[0].appendChild(pwnyBar);
document.getElementsByTagName("body")[0].appendChild(pwnyStyle);				
		

// Random value on start
function rdm(){
	return [0,0,0,94,2,0,96,0,1,99,4,1,9,2,0,100,8,0,200,200,13,188,177,0,3,6,166][Math.floor(Math.random()*10)];    		
};
let random = rdm();
document.documentElement.style="filter:invert("+random+"%);-webkit-filter:invert("+random+"%)";   
document.getElementById("inVal").value = random;

// Filters functions
function pwnyFilters(){
	if (document.getElementById("radInvert").checked >= 1) {	
		document.getElementById("valBox").innerHTML = document.getElementById("inVal").value+"%";
		var update = document.getElementById("valBox").innerHTML;
		var keepBright = document.getElementById("radBright").dataset.current;			
		var keepSepia = document.getElementById("radSepia").dataset.current+"%";			
	    var keepGrayscale = document.getElementById("radGray").dataset.current+"%";
		var keepHue = document.getElementById("radHR").dataset.current;
		var keepSaturate = document.getElementById("radSaturate").dataset.current+"%";	
		document.documentElement.style.cssText += "filter:brightness("+keepBright+")sepia("+keepSepia+")invert("+update+")saturate("+keepSaturate+")grayscale("+keepGrayscale+")hue-rotate("+keepHue+");-webkit-filter:sepia("+keepSepia+")invert("+update+")saturate("+keepSaturate+")brightness("+keepBright+")grayscale("+keepGrayscale+")hue-rotate("+keepHue+")";
		document.getElementById("radInvert").dataset.current=document.getElementById("inVal").value;			
      }
	if (document.getElementById("radSepia").checked >= 1) {	
		document.getElementById("valBox").innerHTML = document.getElementById("inVal").value+"%";
		var update = document.getElementById("valBox").innerHTML;
		var keepBright = document.getElementById("radBright").dataset.current;			
		var keepInvert = document.getElementById("radInvert").dataset.current+"%";		
		var keepSepia = document.getElementById("radSepia").dataset.current+"%";			
	    var keepGrayscale = document.getElementById("radGray").dataset.current+"%";
		var keepHue = document.getElementById("radHR").dataset.current;
		var keepSepia = document.getElementById("radSepia").dataset.current+"%";		
		document.documentElement.style.cssText += "filter:brightness("+keepBright+")sepia("+update+")invert("+keepInvert+")saturate("+keepSaturate+")grayscale("+keepGrayscale+")hue-rotate("+keepHue+");-webkit-filter:sepia("+update+")invert("+keepInvert+")saturate("+keepSaturate+")brightness("+keepBright+")grayscale("+keepGrayscale+")hue-rotate("+keepHue+")";
		document.getElementById("radSepia").dataset.current=document.getElementById("inVal").value;				
      }
	if (document.getElementById("radSaturate").checked >= 1) {			
		document.getElementById("valBox").innerHTML = document.getElementById("inVal").value+"%";
		let update = document.getElementById("valBox").innerHTML;
		var keepBright = document.getElementById("radBright").dataset.current;			
		var keepInvert = document.getElementById("radInvert").dataset.current+"%";		
		var keepSepia = document.getElementById("radSepia").dataset.current+"%";			
	    var keepGrayscale = document.getElementById("radGray").dataset.current+"%";
		var keepHue = document.getElementById("radHR").dataset.current;
		document.documentElement.style.cssText += "filter:brightness("+keepBright+")sepia("+keepSepia+")invert("+keepInvert+")saturate("+update+")grayscale("+keepGrayscale+")hue-rotate("+keepHue+");-webkit-filter:sepia("+keepSepia+")invert("+keepInvert+")saturate("+update+")brightness("+keepBright+")grayscale("+keepGrayscale+")hue-rotate("+keepHue+")";
		document.getElementById("radSaturate").dataset.current = document.getElementById("inVal").value;				
      }
	if (document.getElementById("radBright").checked >= 1) {			
		document.getElementById("valBox").innerHTML = document.getElementById("inVal").value;
		var update = ((document.getElementById("valBox").innerHTML)/100)+0.3;
	    var keepGrayscale = document.getElementById("radGray").dataset.current+"%";
		var keepHue = document.getElementById("radHR").dataset.current;
		var keepSepia = document.getElementById("radSepia").dataset.current+"%";
		var keepInvert = document.getElementById("radInvert").dataset.current+"%";
		var keepSaturate = document.getElementById("radSaturate").dataset.current+"%";		
		document.documentElement.style.cssText += "filter:brightness("+update+")sepia("+keepSepia+")invert("+keepInvert+")saturate("+keepSaturate+")grayscale("+keepGrayscale+")hue-rotate("+keepHue+");-webkit-filter:sepia("+keepSepia+")invert("+keepInvert+")saturate("+keepSaturate+")brightness("+update+")grayscale("+keepGrayscale+")hue-rotate("+keepHue+")";
		document.getElementById("radBright").dataset.current = update;			
      }
	if (document.getElementById("radGray").checked >= 1) {			
		document.getElementById("valBox").innerHTML = document.getElementById("inVal").value;
		var update = (document.getElementById("inVal").value)+"%";
		var keepBright = document.getElementById("radBright").dataset.current;		
		var keepHue = document.getElementById("radHR").dataset.current;
		var keepSepia = document.getElementById("radSepia").dataset.current+"%";
		var keepInvert = document.getElementById("radInvert").dataset.current+"%";
		var keepSaturate = document.getElementById("radSaturate").dataset.current+"%";		
		document.documentElement.style.cssText += "filter:brightness("+keepBright+")sepia("+keepSepia+")invert("+keepInvert+")saturate("+keepSaturate+")grayscale("+update+")hue-rotate("+keepHue+");-webkit-filter:sepia("+keepSepia+")invert("+keepInvert+")saturate("+keepSaturate+")brightness("+keepBright+")grayscale("+update+")hue-rotate("+keepHue+")";
		document.getElementById("radGray").dataset.current = update;			
      }
	if (document.getElementById("radHR").checked >= 1) {			
		document.getElementById("valBox").innerHTML = document.getElementById("inVal").value;
		var update = ((document.getElementById("inVal").value)*1.8)+"deg";
		var keepBright = document.getElementById("radBright").dataset.current;		
		var keepSepia = document.getElementById("radSepia").dataset.current+"%";
	    var keepGrayscale = document.getElementById("radGray").dataset.current+"%";			    
		var keepInvert = document.getElementById("radInvert").dataset.current+"%";
		var keepSaturate = document.getElementById("radSaturate").dataset.current+"%";		
		document.documentElement.style.cssText += "filter:brightness("+keepBright+")sepia("+keepSepia+")invert("+keepInvert+")saturate("+keepSaturate+")grayscale("+keepGrayscale+")hue-rotate("+update+");-webkit-filter:sepia("+keepSepia+")invert("+keepInvert+")saturate("+keepSaturate+")brightness("+keepBright+")grayscale("+keepGrayscale+")hue-rotate("+update+")";
		document.getElementById("radHR").dataset.current = update;			
      }		      	      
}

// writeCookie
function writeCookie() {
	document.cookie = "ponyFilters="+document.documentElement.style.cssText+"; expires=Thu, 18 Dec 2017 12:00:00 UTC; path=/";	
	}<commit_msg>Clean and css bug fixes<commit_after>"use strict";

//~ pwnyFilters.js | Dynamic css filters
//~ <NAME> | ponyhacks.com
//~ Enjoy the zonderful ZTF licence

//~ calling cookies:
//~ You can call only this code to set the filters
//~ on any page of the domain - - - - - - - --- - - - - - - - -

function gtCk(name){
	var re = new RegExp(name + "=([^;]+)");
	var value = re.exec(document.cookie);
return (value != null) ? unescape(value[1]) : null;
}
document.addEventListener("DOMContentLoaded", function(event) {
	console.log("ponyFilters loaded!\n");
	document.documentElement.style.cssText = gtCk('ponyFilters');
});

// End of cookie call -- --- - -- - - - -  - - -- - -  - - - -

// Bar vars
var hdump="";
hdump += "<meta charset=\"UTF8\"><form style=\"font-size:13px;vertical-align:bottom;margin:0;padding:0\"><span style='font-size:12px'>🐴 </span>";
hdump += "<label>Brightness<input type=\"checkbox\" id=\"radBright\" title=\"Brightness\" data-current=\"1\" style=\"cursor:pointer\"><label>";
hdump += "<label>Gray<input type=\"checkbox\" id=\"radGray\" title=\"Grayscale\" data-current=\"0\" style=\"cursor:pointer\"><label>";
hdump += "<label>Hue<input type=\"checkbox\" id=\"radHR\" title=\"Hue Rotate\" data-current=\"0deg\" style=\"cursor:pointer\"><\/label>";
hdump += "<\/form><strong>";
hdump += "<a onclick=\"document.documentElement.style='filter:invert(0%);-webkit-filter:invert(0%)'\" href=\"javascript:void(0)\" \
			style=\"font-size:22px;text-decoration:none;vertical-align: top;color:#111111;outline:0\">&#9728;<\/a><\/strong> 		  ";
hdump += "  <form style=\"display:inline;border:0;vertical-align:middle;outline:0\" onchange=\"pwnyFilters()\">";
hdump += "<input style=\"display:inline;border:0;vertical-align:middle;outline:0\" type=\"range\" min=\"0\" max=\"100\" step=\"1\" id=\"inVal\" data-current=\"00\">";
hdump += "<\/form><strong>";
hdump += "<a onclick=\"document.documentElement.style='filter:invert(100%);-webkit-filter:invert(100%)'\" href=\"javascript:void(0)\" \
			style=\"font-size:13px;text-decoration:none;color:#111111;vertical-align:middle;outline:0\">&#127762; <\/a><\/strong><strong><big>";
hdump += "<span id=\"valBox\">";
hdump += "<\/span><\/big><\/strong>";
hdump += "<form style=\"display:inline;font-size:13px;margin:0\">";
hdump += "<label><input type=\"checkbox\" id=\"radInvert\" checked title=\"Invert\" data-current=\"0\" style=\"cursor:pointer\">Invert<\/label>";
hdump += "<label><input type=\"checkbox\" id=\"radSepia\" checked title=\"Sepia\" data-current=\"0\" style=\"cursor:pointer\">Sepia<label>";
hdump += "<label><input type=\"checkbox\" id=\"radSaturate\" checked title=\"Saturate\" data-current=\"0\" style=\"cursor:pointer\">Saturation<label>";
hdump += "<big><bold><span id=\"lock\" onclick=\"writeCookie();this.style.color='yellowgreen';this.innerHTML='✓'\" \
			title=\"Save settings in a cookie\">&nbsp;&#x1F512;</span><\/bold><\/big><\/form>";

// Inject
var pwnyBar = document.createElement("div");
    pwnyBar.id = "pwny";
    pwnyBar.innerHTML = hdump;
    pwnyBar.style = "position:absolute;top:46px;left:0px;width:100%;height:30px;font-size:13px;background-color:#DEDEDE;color:#111111;;min-width:700px;z-index:999;text-align:center";
    console.log(pwnyBar);
var pwnyStyle = document.createElement("style");   
    pwnyStyle.innerHTML = "#pwny{vertical-align:top;margin:0;display:inline;padding:0}#pwny label{all:unset}#pwny input{all:unset}\
    #pwny input[type='range'] {cursor:pointer;width:110px;height:12px;vertical-align: middle;transition: font-size linear 1.2s;-webkit-transition: font-size linear 1.2s;}\
    #pwny input[type='checkbox']{padding: 0;margin:0;vertical-align: middle;display: inline-block}input[type=range]::-moz-focus-outer{border:0}\
    input[type=range]::-moz-range-thumb {background-color:#9EB95D;width:20px}\
    #pwny input{vertical-align:middle}#valBox{color:grey;font-size:0.8em}#lock{cursor:pointer;font-size:1.13em}";
document.getElementsByTagName("body")[0].appendChild(pwnyBar);
document.getElementsByTagName("body")[0].appendChild(pwnyStyle);

// Random value on start
function rdm(){
	return [0,0,0,94,2,0,96,0,1,99,4,1,9,2,0,100,8,0,200,200,13,188,177,0,3,6,166][Math.floor(Math.random()*10)];
};
let random = rdm();
document.documentElement.style="filter:invert("+random+"%);-webkit-filter:invert("+random+"%)";   
document.getElementById("inVal").value = random;

// Filters functions
function pwnyFilters(){
	if (document.getElementById("radInvert").checked >= 1) {
		document.getElementById("valBox").innerHTML = document.getElementById("inVal").value+"%";
		var update = document.getElementById("valBox").innerHTML;
		var keepBright = document.getElementById("radBright").dataset.current;
		var keepSepia = document.getElementById("radSepia").dataset.current+"%";
	    var keepGrayscale = document.getElementById("radGray").dataset.current+"%";
		var keepHue = document.getElementById("radHR").dataset.current;
		var keepSaturate = document.getElementById("radSaturate").dataset.current+"%";	
		document.documentElement.style.cssText += "filter:brightness("+keepBright+")sepia("+keepSepia+")invert("+update+")saturate("+keepSaturate+")grayscale("+keepGrayscale+")hue-rotate("+keepHue+");-webkit-filter:sepia("+keepSepia+")invert("+update+")saturate("+keepSaturate+")brightness("+keepBright+")grayscale("+keepGrayscale+")hue-rotate("+keepHue+")";
		document.getElementById("radInvert").dataset.current=document.getElementById("inVal").value;
      }
	if (document.getElementById("radSepia").checked >= 1) {	
		document.getElementById("valBox").innerHTML = document.getElementById("inVal").value+"%";
		var update = document.getElementById("valBox").innerHTML;
		var keepBright = document.getElementById("radBright").dataset.current;
		var keepInvert = document.getElementById("radInvert").dataset.current+"%";
		var keepSepia = document.getElementById("radSepia").dataset.current+"%";
	    var keepGrayscale = document.getElementById("radGray").dataset.current+"%";
		var keepHue = document.getElementById("radHR").dataset.current;
		var keepSepia = document.getElementById("radSepia").dataset.current+"%";
		document.documentElement.style.cssText += "filter:brightness("+keepBright+")sepia("+update+")invert("+keepInvert+")saturate("+keepSaturate+")grayscale("+keepGrayscale+")hue-rotate("+keepHue+");-webkit-filter:sepia("+update+")invert("+keepInvert+")saturate("+keepSaturate+")brightness("+keepBright+")grayscale("+keepGrayscale+")hue-rotate("+keepHue+")";
		document.getElementById("radSepia").dataset.current=document.getElementById("inVal").value;	
      }
	if (document.getElementById("radSaturate").checked >= 1) {
		document.getElementById("valBox").innerHTML = document.getElementById("inVal").value+"%";
		let update = document.getElementById("valBox").innerHTML;
		var keepBright = document.getElementById("radBright").dataset.current;
		var keepInvert = document.getElementById("radInvert").dataset.current+"%";
		var keepSepia = document.getElementById("radSepia").dataset.current+"%";
	    var keepGrayscale = document.getElementById("radGray").dataset.current+"%";
		var keepHue = document.getElementById("radHR").dataset.current;
		document.documentElement.style.cssText += "filter:brightness("+keepBright+")sepia("+keepSepia+")invert("+keepInvert+")saturate("+update+")grayscale("+keepGrayscale+")hue-rotate("+keepHue+");-webkit-filter:sepia("+keepSepia+")invert("+keepInvert+")saturate("+update+")brightness("+keepBright+")grayscale("+keepGrayscale+")hue-rotate("+keepHue+")";
		document.getElementById("radSaturate").dataset.current = document.getElementById("inVal").value;
      }
	if (document.getElementById("radBright").checked >= 1) {
		document.getElementById("valBox").innerHTML = document.getElementById("inVal").value;
		var update = ((document.getElementById("valBox").innerHTML)/100)+0.3;
	    var keepGrayscale = document.getElementById("radGray").dataset.current+"%";
		var keepHue = document.getElementById("radHR").dataset.current;
		var keepSepia = document.getElementById("radSepia").dataset.current+"%";
		var keepInvert = document.getElementById("radInvert").dataset.current+"%";
		var keepSaturate = document.getElementById("radSaturate").dataset.current+"%";
		document.documentElement.style.cssText += "filter:brightness("+update+")sepia("+keepSepia+")invert("+keepInvert+")saturate("+keepSaturate+")grayscale("+keepGrayscale+")hue-rotate("+keepHue+");-webkit-filter:sepia("+keepSepia+")invert("+keepInvert+")saturate("+keepSaturate+")brightness("+update+")grayscale("+keepGrayscale+")hue-rotate("+keepHue+")";
		document.getElementById("radBright").dataset.current = update;
      }
	if (document.getElementById("radGray").checked >= 1) {
		document.getElementById("valBox").innerHTML = document.getElementById("inVal").value;
		var update = (document.getElementById("inVal").value)+"%";
		var keepBright = document.getElementById("radBright").dataset.current;
		var keepHue = document.getElementById("radHR").dataset.current;
		var keepSepia = document.getElementById("radSepia").dataset.current+"%";
		var keepInvert = document.getElementById("radInvert").dataset.current+"%";
		var keepSaturate = document.getElementById("radSaturate").dataset.current+"%";
		document.documentElement.style.cssText += "filter:brightness("+keepBright+")sepia("+keepSepia+")invert("+keepInvert+")saturate("+keepSaturate+")grayscale("+update+")hue-rotate("+keepHue+");-webkit-filter:sepia("+keepSepia+")invert("+keepInvert+")saturate("+keepSaturate+")brightness("+keepBright+")grayscale("+update+")hue-rotate("+keepHue+")";
		document.getElementById("radGray").dataset.current = update;
      }
	if (document.getElementById("radHR").checked >= 1) {
		document.getElementById("valBox").innerHTML = document.getElementById("inVal").value;
		var update = ((document.getElementById("inVal").value)*1.8)+"deg";
		var keepBright = document.getElementById("radBright").dataset.current;
		var keepSepia = document.getElementById("radSepia").dataset.current+"%";
	    var keepGrayscale = document.getElementById("radGray").dataset.current+"%";	 
		var keepInvert = document.getElementById("radInvert").dataset.current+"%";
		var keepSaturate = document.getElementById("radSaturate").dataset.current+"%";	
		document.documentElement.style.cssText += "filter:brightness("+keepBright+")sepia("+keepSepia+")invert("+keepInvert+")saturate("+keepSaturate+")grayscale("+keepGrayscale+")hue-rotate("+update+");-webkit-filter:sepia("+keepSepia+")invert("+keepInvert+")saturate("+keepSaturate+")brightness("+keepBright+")grayscale("+keepGrayscale+")hue-rotate("+update+")";
		document.getElementById("radHR").dataset.current = update;	
      }		      	      
}

// writeCookie
function writeCookie() {
	document.cookie = "ponyFilters="+document.documentElement.style.cssText+"; expires=Thu, 18 Dec 2017 12:00:00 UTC; path=/";	
	}
{'fraction_non_alphanumeric': 0.20774697604367676, 'fraction_numerical': 0.016755306631524452, 'mean_word_length': 7.219729206963249, 'pattern_counts': {'":': 0, '<': 101, '<?xml version=': 0, '>': 113, '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': '2302024', 'n_tokens_mistral': 7333, 'n_tokens_neox': 6881, 'n_words': 761}