<commit_before>
document.getElementById("id_logic_version").innerHTML = "Logic version: 2019.11.15.4";
document.getElementById("id_request").addEventListener("click", request_permission);
//-----------------------------------
function ok_f(result)
{
	if (result == "granted")
		window.addEventListener("deviceorientation", on_device_orientation);
	else
		alert("permission not granted");
}
//-----------------------------------
function not_ok_f(e)
{
	alert(e);
}
//-----------------------------------
if (typeof(DeviceOrientationEvent.requestPermission) === "function"){
}
else{
	window.addEventListener("deviceorientation", on_device_orientation);
}	
//-----------------------------------
window.addEventListener("devicemotion", on_device_motion);

function request_permission()
{
	DeviceOrientationEvent.requestPermission().then(ok_f).catch(not_ok_f);	
}

//--------------------------------
function on_device_orientation(e)
{
	document.getElementById("id_alpha").innerHTML = e.alpha;
	document.getElementById("id_beta").innerHTML = e.beta;
	document.getElementById("id_gamma").innerHTML = e.gamma;	
	
	var canvas = document.getElementById("id_canvas");<commit_msg>Update orientation.js<commit_after>
document.getElementById("id_logic_version").innerHTML = "Logic version: 2019.11.15.5";
document.getElementById("id_request").addEventListener("click", request_permission);
//-----------------------------------
function ok_f(result)
{
	if (result == "granted")
		window.addEventListener("deviceorientation", on_device_orientation);
	else
		alert("permission not granted");
}
//-----------------------------------
function not_ok_f(e)
{
	alert(e);
}
//-----------------------------------
if (typeof(DeviceOrientationEvent.requestPermission) == "function"){
}
else{
	window.addEventListener("deviceorientation", on_device_orientation);
}	
//-----------------------------------
window.addEventListener("devicemotion", on_device_motion);

function request_permission()
{
	DeviceOrientationEvent.requestPermission().then(ok_f).catch(not_ok_f);	
}

//--------------------------------
function on_device_orientation(e)
{
	document.getElementById("id_alpha").innerHTML = e.alpha;
	document.getElementById("id_beta").innerHTML = e.beta;
	document.getElementById("id_gamma").innerHTML = e.gamma;	
	
	var canvas = document.getElementById("id_canvas");
{'fraction_non_alphanumeric': 0.27230046948356806, 'fraction_numerical': 0.0076824583866837385, 'mean_word_length': 3.0344234079173837, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '2839459', 'n_tokens_mistral': 642, 'n_tokens_neox': 601, 'n_words': 86}