<commit_before><html>
	<head>
		<title>Footlights</title>
		<link rel="stylesheet" type="text/css" href="/static/footlights/style/footlights.css"/>

		<script type="text/javascript" src="/static/footlights/ses/whitelist.js"></script>
		<script type="text/javascript" src="/static/footlights/ses/atLeastFreeVarNames.js"></script>
		<script type="text/javascript" src="/static/footlights/ses/WeakMap.js"></script>
		<script type="text/javascript" src="/static/footlights/ses/initSES.js"></script>

		<script type="text/javascript" src="/static/footlights/dom-proxy.js"></script>
		<script type="text/javascript" src="/static/footlights/sandboxes.js"></script>

		<script type="text/javascript" src="/static/footlights/content-updaters.js"></script>
		<script type="text/javascript" src="/static/footlights/ajax.js"></script>
	</head>
	
	<body>
		<h1>Footlights</h1>

		<div id="root">
			<div id="status"></div>

			<div id="content">
				<div id="buttons">Loading buttons...</div>
			</div>
		</div>

		<script type="text/javascript">
'use strict';
initSES(window, whitelist, atLeastFreeVarNames);

(function()
{
	// Set up logging (nice user-visible log box).
	var status = document.getElementById('status');
	status.log = function(t)
	{
		var update = document.createElement('p');
		this.insertBefore(update, this.firstChild);

		var dateStamp = document.createElement('div');
		dateStamp.appendChild(document.createTextNode(new Date().toUTCString()));
		dateStamp.className = 'timestamp';

		update.appendChild(dateStamp);
		update.appendChild(document.createTextNode(t));
	};

	// The global context.
	var rootContext =
	{
		ajax: function(request) { ajax('/ajax/global/' + request, this); },
		exec: function(code) { eval(code); },
		log:  function(message) { status.log(message); },
		name: 'global',
		root: document.getElementById('content'),
	};
	sandboxes['global'] = rootContext;

	rootContext.ajax('init');
})();
		</script><commit_msg>Let TCB specify custom Ajax callbacks, too.<commit_after><html>
	<head>
		<title>Footlights</title>
		<link rel="stylesheet" type="text/css" href="/static/footlights/style/footlights.css"/>

		<script type="text/javascript" src="/static/footlights/ses/whitelist.js"></script>
		<script type="text/javascript" src="/static/footlights/ses/atLeastFreeVarNames.js"></script>
		<script type="text/javascript" src="/static/footlights/ses/WeakMap.js"></script>
		<script type="text/javascript" src="/static/footlights/ses/initSES.js"></script>

		<script type="text/javascript" src="/static/footlights/dom-proxy.js"></script>
		<script type="text/javascript" src="/static/footlights/sandboxes.js"></script>

		<script type="text/javascript" src="/static/footlights/content-updaters.js"></script>
		<script type="text/javascript" src="/static/footlights/ajax.js"></script>
	</head>
	
	<body>
		<h1>Footlights</h1>

		<div id="root">
			<div id="status"></div>

			<div id="content">
				<div id="buttons">Loading buttons...</div>
			</div>
		</div>

		<script type="text/javascript">
'use strict';
initSES(window, whitelist, atLeastFreeVarNames);

(function()
{
	// Set up logging (nice user-visible log box).
	var status = document.getElementById('status');
	status.log = function(t)
	{
		var update = document.createElement('p');
		this.insertBefore(update, this.firstChild);

		var dateStamp = document.createElement('div');
		dateStamp.appendChild(document.createTextNode(new Date().toUTCString()));
		dateStamp.className = 'timestamp';

		update.appendChild(dateStamp);
		update.appendChild(document.createTextNode(t));
	};

	// The global context.
	var rootContext =
	{
		ajax: function(request, callback) { ajax('/ajax/global/' + request, this, callback); },
		exec: function(code) { eval(code); },
		log:  function(message) { status.log(message); },
		name: 'global',
		root: document.getElementById('content'),
	};
	sandboxes['global'] = rootContext;

	rootContext.ajax('init');
})();
		</script>
{'fraction_non_alphanumeric': 0.1876267748478702, 'fraction_numerical': 0.0010141987829614604, 'mean_word_length': 5.106811145510836, 'pattern_counts': {'":': 0, '<': 73, '<?xml version=': 0, '>': 73, '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': '5526769', 'n_tokens_mistral': 1366, 'n_tokens_neox': 1260, 'n_words': 213}