<commit_before>// Info here: http://ad.aloodo.com/

function doAloodoPopup() {
	var url = 'http://www.aloodo.org/protection/';
	var message = 	'<b>Third-party tracking detected.</b> ' +
			'Missing or misconfigured tracking protection.';
	var txt = '<a href="' + url + '">' + message + '</a>';

	if (typeof toastr=='undefined') {
		window.setTimeout(doAloodoPopup, 1000);
	} else {
		toastr.options = { 'timeOut': 30000 };
		toastr.error(txt);
	}
}

function toastrSetup() {
	if (typeof toastr !== 'undefined') {
		doAloodoPopup();
	}
	var sc = document.createElement('script');
	sc.setAttribute('src', 'http://ad.aloodo.com/toastr/toastr.js');
	document.body.appendChild(sc);
	sc.onload = doAloodoPopup();
	var cs = document.createElement('link');
	cs.setAttribute("rel", "stylesheet");
	cs.setAttribute("type", "text/css");
	cs.setAttribute("href", 'http://ad.aloodo.com/toastr/toastr.css');
	document.getElementsByTagName('head')[0].appendChild(cs);
}

function startAloodo(ev) {
	if (ev.data !== 'tracking detected') {
		return;
	}

	if (window.trackingAlternateLocation) {
		document.getElementsByTagName('body')[0].style.display='none';
		window.location.href = trackingAlternateLocation;
		return;
	}

	var safety = document.getElementById('tracking-safety');
	if (safety) {
		safety.style.display = 'none';
	}

	var done = false;
	var warning = document.getElementById('tracking-warning-block');
	if (warning) {
		warning.style.display = 'block';
		done = true;
	}
	var warning = document.getElementById('tracking-warning-table-cell');
	if (warning) {
		warning.style.display = 'table-cell';
		done = true;
	}
	var warning = document.getElementById('tracking-warning-inline');
	if (warning) {
		warning.style.display = 'inline';
		done = true;
	}
	if (done) { return; }

	if(typeof jQuery=='undefined') {
		var jq = document.createElement('script');
		jq.src = '//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js';
		jq.onload = toastrSetup;
		document.body.appendChild(jq);
	} else {
		toastrSetup();
	}
}

function isMSIE() {
	return "ActiveXObject" in window
}

function setupAloodo() {
	// This puts the tracker in an iframe.
	var ifr = document.createElement('iframe');
	ifr.src = "//ad.aloodo.com/track/";
	ifr.style.visibility = 'hidden';
	document.body.appendChild(ifr);
}

window.addEventListener("message", startAloodo, false);
document.addEventListener("DOMContentLoaded", setupAloodo);

// Workaround for not being able to send cross-domain messages
// from iframe to its parent.  Assumes that MSIE is unprotected
// if this script runs at all.
if (isMSIE()) {
	window.postMessage('tracking detected', '*');
}<commit_msg>Safari test<commit_after>// Info here: http://ad.aloodo.com/

function doAloodoPopup() {
	var url = 'http://www.aloodo.org/protection/';
	var message = 	'<b>Third-party tracking detected.</b> ' +
			'Missing or misconfigured tracking protection.';
	var txt = '<a href="' + url + '">' + message + '</a>';

	if (typeof toastr=='undefined') {
		window.setTimeout(doAloodoPopup, 1000);
	} else {
		toastr.options = { 'timeOut': 30000 };
		toastr.error(txt);
	}
}

function toastrSetup() {
	if (typeof toastr !== 'undefined') {
		doAloodoPopup();
	}
	var sc = document.createElement('script');
	sc.setAttribute('src', 'http://ad.aloodo.com/toastr/toastr.js');
	document.body.appendChild(sc);
	sc.onload = doAloodoPopup();
	var cs = document.createElement('link');
	cs.setAttribute("rel", "stylesheet");
	cs.setAttribute("type", "text/css");
	cs.setAttribute("href", 'http://ad.aloodo.com/toastr/toastr.css');
	document.getElementsByTagName('head')[0].appendChild(cs);
}

function startAloodo(ev) {
	if (ev.data !== 'tracking detected') {
		return;
	}

	if (window.trackingAlternateLocation) {
		document.getElementsByTagName('body')[0].style.display='none';
		window.location.href = trackingAlternateLocation;
		return;
	}

	var safety = document.getElementById('tracking-safety');
	if (safety) {
		safety.style.display = 'none';
	}

	var done = false;
	var warning = document.getElementById('tracking-warning-block');
	if (warning) {
		warning.style.display = 'block';
		done = true;
	}
	var warning = document.getElementById('tracking-warning-table-cell');
	if (warning) {
		warning.style.display = 'table-cell';
		done = true;
	}
	var warning = document.getElementById('tracking-warning-inline');
	if (warning) {
		warning.style.display = 'inline';
		done = true;
	}
	if (done) { return; }

	if(typeof jQuery=='undefined') {
		var jq = document.createElement('script');
		jq.src = '//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js';
		jq.onload = toastrSetup;
		document.body.appendChild(jq);
	} else {
		toastrSetup();
	}
}

function isMSIE() {
	return "ActiveXObject" in window
}

function isSafari() {
	return navigator.userAgent.indexOf('Safari') != -1 && navigator.userAgent.indexOf('Chrome') == -1
}

function setupAloodo() {
	// This puts the tracker in an iframe.
	var ifr = document.createElement('iframe');
	ifr.src = "//ad.aloodo.com/track/";
	ifr.style.visibility = 'hidden';
	document.body.appendChild(ifr);
}

window.addEventListener("message", startAloodo, false);
document.addEventListener("DOMContentLoaded", setupAloodo);

// Assume that MSIE or Safari are unprotected if this script runs.
// No Privacy Badger on these two browsers.
if (isSafari() || isMSIE()) {
	window.postMessage('tracking detected', '*');
}
{'fraction_non_alphanumeric': 0.17127481907589534, 'fraction_numerical': 0.005938021896455743, 'mean_word_length': 4.522540983606557, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '3757758', 'n_tokens_mistral': 1949, 'n_tokens_neox': 1850, 'n_words': 368}