<commit_before>/*********************************************************\
* Menus and page interaction                              *
\*********************************************************/

$(function() {

//------------------------------------------------------------------------------

// Initialization
$('button.icon').each(function()
{
	var glyph = $(this).text();
	$(this)
		.html('<svg class="icon"><use xlink:href="#'+glyph+'" class="icon-'+glyph+'"></use></svg>')
	;
});

setTimeout(function () { window.scrollTo(0, 1); }, 1);

function resize()
{
	var isTouchScreen = 'ontouchstart' in window;
	$('body')
		.css('font-size', Math.max(screen.height / 50, 5) * (isTouchScreen ? 1 : 0.8))
	;
}

resize();

// Topbar
$('#btn-back').click(function()
{
	$('#menu').show();
	$('#options').hide();
	$('#about').hide();
	$('#topbar').hide();
});

// Game bar / screen
$('#btn-menu').click(function()
{
	$('#btn-play').text('Resume');
	$('#menu').show();
	$('#gamebar').hide();
	game.pause();
});

$('#btn-restart').click(function()
{
	game.start(game.level.id);
});

$('#btn-pause').click(function()
{
	game.pause();
	$('#pause-screen').show();
});

$('#pause-screen').click(function()
{
	$('#pause-screen').hide();
	game.resume();
});

$('#btn-win-restart').click(function()
{
	$('#win-screen').hide();
	game.start(game.level.id);
});

$('#btn-win-resume').click(function()
{
	$('#win-screen').hide();
	game.start(game.level.next);
});

$('#btn-win-menu').click(function()
{
	$('#win-screen').hide();
	game.start(game.level.next);
	$('#btn-menu').click();
});

// Menu
$('#btn-play').click(function()
{
	$('#menu').hide();
	$('#gamebar').show();
	game.resume();
});
$('#btn-options').click(function()
{
	$('#options').show();
	$('#topbar').show();
});
$('#btn-about').click(function()
{
	$('#about').show();
	$('#topbar').show();
});
$('#btn-exit').click(function()
{
	window.close();
});

// About
$('#about-tabs a').click(function()
{
	var target = $('#' + $(this).attr('id').slice(4));
	$('#about article').scrollTo(target, 350, { offset: -20 });
});
function select()
{
	$('#about-tabs a').removeClass('selected');
	$('#btn-' + $(this.element).attr('id')).toggleClass('selected', true);
}<commit_msg>Fixed waypoints in about pages<commit_after>/*********************************************************\
* Menus and page interaction                              *
\*********************************************************/

$(function() {

//------------------------------------------------------------------------------

// Initialization
$('button.icon').each(function()
{
	var glyph = $(this).text();
	$(this)
		.html('<svg class="icon"><use xlink:href="#'+glyph+'" class="icon-'+glyph+'"></use></svg>')
	;
});

setTimeout(function () { window.scrollTo(0, 1); }, 1);

function resize()
{
	var isTouchScreen = 'ontouchstart' in window;
	$('body')
		.css('font-size', Math.max(screen.height / 50, 5) * (isTouchScreen ? 1 : 0.8))
	;
}

resize();

// Topbar
$('#btn-back').click(function()
{
	$('#menu').show();
	$('#options').hide();
	$('#about').hide();
	$('#topbar').hide();
});

// Game bar / screen
$('#btn-menu').click(function()
{
	$('#btn-play').text('Resume');
	$('#menu').show();
	$('#gamebar').hide();
	game.pause();
});

$('#btn-restart').click(function()
{
	game.start(game.level.id);
});

$('#btn-pause').click(function()
{
	game.pause();
	$('#pause-screen').show();
});

$('#pause-screen').click(function()
{
	$('#pause-screen').hide();
	game.resume();
});

$('#btn-win-restart').click(function()
{
	$('#win-screen').hide();
	game.start(game.level.id);
});

$('#btn-win-resume').click(function()
{
	$('#win-screen').hide();
	game.start(game.level.next);
});

$('#btn-win-menu').click(function()
{
	$('#win-screen').hide();
	game.start(game.level.next);
	$('#btn-menu').click();
});

// Menu
$('#btn-play').click(function()
{
	$('#menu').hide();
	$('#gamebar').show();
	game.resume();
});
$('#btn-options').click(function()
{
	$('#options').show();
	$('#topbar').show();
});
$('#btn-about').click(function()
{
	$('#about').show();
	$('#topbar').show();
	Waypoint.refreshAll();
});
$('#btn-exit').click(function()
{
	window.close();
});

// About
$('#about-tabs a').click(function()
{
	var target = $('#' + $(this).attr('id').slice(4));
	$('#about article').scrollTo(target, 350, { offset: -20 });
});
function select()
{
	$('#about-tabs a').removeClass('selected');
	$('#btn-' + $(this.element).attr('id')).toggleClass('selected', true);
}
{'fraction_non_alphanumeric': 0.38029115341545355, 'fraction_numerical': 0.006718924972004479, 'mean_word_length': 4.075, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, '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': '3981153', 'n_tokens_mistral': 1513, 'n_tokens_neox': 1548, 'n_words': 203}