<commit_before><html>
<head>
<meta charset="UTF-8">
<title>Vidya Intarweb Playlist - HTML5 Player</title>
<link href="http://maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
<script src="http://code.jquery.com/jquery-1.11.0.min.js"></script>
<script>
	var g_playlist = null;
	var g_previous = [];
	var g_previous_idx = 0;
	var MAX_HISTORY = 10;

	var scrubp = 0;
	var is_dragging_scrubber = false;

	function formatTimecode (seconds) {
		seconds = Math.floor (seconds);
		minutes = Math.floor (seconds / 60);
		seconds = seconds - (minutes * 60);
		minutes = "" + minutes;
		seconds = "" + seconds;

		if (minutes.length == 1)
			minutes = "0" + minutes;
		if (seconds.length == 1)
			seconds = "0" + seconds;

		return minutes + ":" + seconds;
	}

	function parsePlaylist (playlistXML) {
		// roster.xml from VIP is currently broken (2014.10.15); this fixes it before parsing
		playlistXML = playlistXML.replace (/&/g, '&amp;');

		playlistXML = $.parseXML (playlistXML);
		

		result = [];

		$(playlistXML).find ('playlist trackList > track').each (function () {
			track = {
				creator: $(this).find ('creator').text (),
				title: $(this).find ('title').text (),
				location: $(this).find ('location').text ()
			};

			result.push (track);
		});

		return result;
	}

	function playPreviousTrack () {
		if (g_playlist === null)
			return;

		if (g_previous_idx <= 0)
			g_previous_idx = 0;
		else
			g_previous_idx -= 1;

		playTrack (g_previous[g_previous_idx]);
	}

	function playNextTrack () {
		if (g_playlist === null)
			return;

		if (g_previous_idx >= (g_previous.length - 1)) {
			g_previous.push (Math.floor (Math.random () * g_playlist.length));
			g_previous_idx = g_previous.length - 1;
		}
		else {
			g_previous_idx += 1;
		}

		while (g_previous.length > MAX_HISTORY) {
			g_previous.shift ();
			g_previous_idx -= 1;
		}

		playTrack (g_previous[g_previous_idx]);
	}


	function playTrack (trackid) {
		var track = g_playlist[trackid];

		$('#tracks-table tr').removeClass ('selected');
		var trackelem = $('#tracks-table tr').eq (trackid);
		trackelem.addClass ('selected');

		$('audio').attr ('src', track.location);
		$('audio').trigger ('play');

		$('html, body').stop ().animate ({
			scrollTop: trackelem.offset ().top - $('.control-bar').height ()
		}, 1000);
	}

	function loadNewPlaylist () {
		var playlistURL = $('#select-playlist').val ();

		// Clear
		$('#tracks-table tr').remove ();
		g_previous = [];
		g_previous_idx = 0;
		g_playlist = null;

		$.getJSON ('http://whateverorigin.org/get?url=' + encodeURIComponent (playlistURL) + '&callback=?', function (data) {
			// Parse track list
			g_playlist = parsePlaylist (data.contents);

			// Build HTML table for track listing
			for (var i = 0; i < g_playlist.length; ++i) {
				var track = g_playlist[i];

				var row = $('<tr>').append (
					$('<td>').text (track.creator + ' - ' + track.title)
				);
			
				row.appendTo ('#tracks-table');
				(function (i) {
					row.click (function () {
						playTrack (i);
					});
				}) (i);
			}

			// Begin playing random tracks
			playNextTrack ();
		});
	}

	function playpause () {
		if ($('audio').get (0).paused)
			$('audio').trigger ('play');
		else
			$('audio').trigger ('pause');
	}

	$(function () {
		// Register Events
		$('audio').on ('pause', function () {
			$('#btn-play i').removeClass ('fa-pause');
			$('#btn-play i').addClass ('fa-play');
		});

		$('audio').on ('play', function () {
			$('#btn-play i').removeClass ('fa-play');
			$('#btn-play i').addClass ('fa-pause');
		});

		$('audio').on ('timeupdate', function () {
			if (isNaN (this.duration))
				return;
			if (!is_dragging_scrubber)
				$('#scrubber-progress').css('width', (this.currentTime / this.duration) * 100+'%');
			$('#time-current').text (formatTimecode (this.currentTime));
			$('#time-remaining').text (formatTimecode (this.duration - this.currentTime));
		});

		$('#scrubber-track').on('mousedown mouseup', function(e) {
			is_dragging_scrubber = true;
			var sc_w = $('#scrubber-track').outerWidth();
			var p = ((e.pageX - $('#scrubber-track').offset().left) / sc_w) * 100;
			$('#scrubber-progress').css('width', p+'%');
			scrubp = p;
			$(document).on('mousemove.scrubber-track', function(e) {
				sc_w = $('#scrubber-track').outerWidth();
				p = ((e.pageX - $('#scrubber-track').offset().left) / sc_w) * 100;
				$('#scrubber-progress').css('width', p+'%');
				scrubp = p;
			});
		});

		$(document).on('mouseup.scrubber-track', function(e) {
			$('audio').get(0).currentTime = (scrubp / 100) * $('audio').get(0).duration;
			$(this).off('mousemove.scrubber-track');
			is_dragging_scrubber = false;
		});

		$('audio').on ('ended', function () {
			playNextTrack ();
		});

		$('#btn-play').click (playpause);

		$(document).keypress (function (e) {
			if (e.which == 32) {
				e.preventDefault ();
				playpause ();
			}
		});

		$('#btn-next').click (function () {
			playNextTrack ();
		});

		$('#btn-previous').click (function () {
			playPreviousTrack ();
		});

		$('#select-playlist').on ('change', function () {
			loadNewPlaylist ();
		});

		// Load current playlist
		loadNewPlaylist ();
	});
</script>

<style>
	html, body, div, span, applet, object, iframe,
	h1, h2, h3, h4, h5, h6, p, blockquote, pre,
	a, abbr, acronym, address, big, cite, code,
	del, dfn, em, img, ins, kbd, q, s, samp,
	small, strike, strong, sub, sup, tt, var,
	b, u, i, center,
	dl, dt, dd, ol, ul, li,
	fieldset, form, label, legend,
	table, caption, tbody, tfoot, thead, tr, th, td,
	article, aside, canvas, details, embed, 
	figure, figcaption, footer, header, hgroup, 
	menu, nav, output, ruby, section, summary,
	time, mark, audio, video {
		margin: 0;
		padding: 0;
		border: 0;
		font-size: 100%;
		font: inherit;
		vertical-align: baseline;
	}
	/* HTML5 display-role reset for older browsers */
	article, aside, details, figcaption, figure, 
	footer, header, hgroup, menu, nav, section {
		display: block;
	}
	body {
		line-height: 1;
		-webkit-user-select: none;
	}
	ol, ul {
		list-style: none;
	}
	blockquote, q {
		quotes: none;
	}
	blockquote:before, blockquote:after,
	q:before, q:after {
		content: '';
		content: none;
	}
	table {
		border-collapse: collapse;
		border-spacing: 0;
	}

	body {
		background-color: #183c63;
	}

	#tracks-table {
		width: 100%;
		margin-top: 18px;
	}

	#tracks-table td {
		background-color: #183c63;
		border: 1px solid #003366;
		color: #FF9148;
		padding: 5px;
		font-family: Helvetica, Arial, sans-serif;
		font-size: 8pt;
		cursor: pointer;
	}

	#tracks-table tr.selected td {
		background-color: #e5874a;
		color: #183c63;
	}

	#tracks-table tr:hover td {
		background-color: #4e91ff;
		color: #183c63;
	}

	.control-bar {
		position: fixed;
		top: 0;
		left: 0;
		width: 100%;
		height: 18px;
		background: linear-gradient(to bottom, rgba(192,204,217,1) 0%, rgba(0,12,25,1) 100%);
	}

	.control-buttons {
		width: 100%;
		height: 100%;
		border-spacing: 1px;
		border-collapse: separate;
	}

	.control-buttons td {
		font-family: Helvetica, Arial, sans-serif;
		font-size: 7pt;
		color: #FF9148;
		border-width: 0px;
		background: linear-gradient(to bottom, rgba(61,99,137,1) 0%, rgba(3,41,79,1) 100%);
		text-align: center;
		cursor: pointer;
		vertical-align: middle;
	}

	.control-buttons td:hover {
		color: #4e91ff;
	}

	.control-button {
		width: 20px;
	}

	.control-volume {
		width: 60px;
		font-size: 9pt;
	}

	.control-playlist {
		width: 80px;
	}

	.control-playlist select {
		height: 16px;
		font-family: Helvetica, Arial, sans-serif;
		font-size: 7pt;
		padding: 0;
		color: #FF9148;
		border: 0;
		background: transparent;
	}

	.credits {
		position: fixed;
		bottom: 0;
		right: 0;
		width: 100px;
		background-color: #000;
		background-color: rgba(0,0,0,0.5);
		color: #FF9148;
		padding: 5px;
		font-family: Helvetica, Arial, sans-serif;
		font-size: 8pt;
		text-align: center;
	}

	.credits a {
		color: #a96030;
		font-family: Helvetica, Arial, sans-serif;
		font-size: 8pt;
		text-decoration: none;
	}

	#time-current, #time-remaining {
		width: 60px;
	}

	#scrubber-track {
		width: 100%;
		height: 5px;
		background: gray;
	}
	#scrubber-progress {
		background: #FF9148;
		height: 100%;
	}
	#scrubber {
		position: relative;
		right: -50%;
		height: 10px;
		width: 6px;
		display: inline-block;
		background: lightgrey;
		-ms-transform: translate(-50%,-25%);
		-webkit-transform: translate(-50%,-25%);
		transform: translate(-50%,-25%);
	}
</style>
</head>
<body>
	<div class='control-bar'>
		<table class='control-buttons' cellpadding="0" cellspacing="0">
			<tr>
				<td id='btn-play' class='control-button'><i class="fa fa-play"></i></td>
				<td id='btn-previous' class='control-button'><i class="fa fa-step-backward"></i></td>
				<td id='btn-next' class='control-button'><i class="fa fa-step-forward"></i></td>
				<td id='time-current'></td>
				<td id='time-bar'><div id="scrubber-track"><div id="scrubber-progress"><div id="scrubber"></div></div></div></td>
				<td id='time-remaining'></td>
				<td class='control-playlist'>
					<select id='select-playlist'>
						<option value='http://vip.aersia.net/roster.xml' selected='selected'>VIP</option>
						<option value='http://vip.aersia.net/roster-mellow.xml'>Mellow</option>
						<option value='http://vip.aersia.net/roster-source.xml'>Source</option>
						<option value='http://vip.aersia.net/roster-exiled.xml'>Exiled</option>
						<option value='http://wap.aersia.net/roster.xml'>WAP</option>
					</select>
				</td>
			</tr>
		</table>
	</div>

	<audio></audio>

	<table id='tracks-table' cellpadding="0" cellspacing="0"></table>

	<div class='credits'>
		<a href="http://aersia.net" target="_blank">playlist by Cats777</a>
	</div>
</body>
</html>
<commit_msg>Fixed so that it doesn't update song position on every mouseup events :)<commit_after><html>
<head>
<meta charset="UTF-8">
<title>Vidya Intarweb Playlist - HTML5 Player</title>
<link href="http://maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
<script src="http://code.jquery.com/jquery-1.11.0.min.js"></script>
<script>
	var g_playlist = null;
	var g_previous = [];
	var g_previous_idx = 0;
	var MAX_HISTORY = 10;

	var scrubp = 0;
	var is_dragging_scrubber = false;

	function formatTimecode (seconds) {
		seconds = Math.floor (seconds);
		minutes = Math.floor (seconds / 60);
		seconds = seconds - (minutes * 60);
		minutes = "" + minutes;
		seconds = "" + seconds;

		if (minutes.length == 1)
			minutes = "0" + minutes;
		if (seconds.length == 1)
			seconds = "0" + seconds;

		return minutes + ":" + seconds;
	}

	function parsePlaylist (playlistXML) {
		// roster.xml from VIP is currently broken (2014.10.15); this fixes it before parsing
		playlistXML = playlistXML.replace (/&/g, '&amp;');

		playlistXML = $.parseXML (playlistXML);
		

		result = [];

		$(playlistXML).find ('playlist trackList > track').each (function () {
			track = {
				creator: $(this).find ('creator').text (),
				title: $(this).find ('title').text (),
				location: $(this).find ('location').text ()
			};

			result.push (track);
		});

		return result;
	}

	function playPreviousTrack () {
		if (g_playlist === null)
			return;

		if (g_previous_idx <= 0)
			g_previous_idx = 0;
		else
			g_previous_idx -= 1;

		playTrack (g_previous[g_previous_idx]);
	}

	function playNextTrack () {
		if (g_playlist === null)
			return;

		if (g_previous_idx >= (g_previous.length - 1)) {
			g_previous.push (Math.floor (Math.random () * g_playlist.length));
			g_previous_idx = g_previous.length - 1;
		}
		else {
			g_previous_idx += 1;
		}

		while (g_previous.length > MAX_HISTORY) {
			g_previous.shift ();
			g_previous_idx -= 1;
		}

		playTrack (g_previous[g_previous_idx]);
	}


	function playTrack (trackid) {
		var track = g_playlist[trackid];

		$('#tracks-table tr').removeClass ('selected');
		var trackelem = $('#tracks-table tr').eq (trackid);
		trackelem.addClass ('selected');

		$('audio').attr ('src', track.location);
		$('audio').trigger ('play');

		$('html, body').stop ().animate ({
			scrollTop: trackelem.offset ().top - $('.control-bar').height ()
		}, 1000);
	}

	function loadNewPlaylist () {
		var playlistURL = $('#select-playlist').val ();

		// Clear
		$('#tracks-table tr').remove ();
		g_previous = [];
		g_previous_idx = 0;
		g_playlist = null;

		$.getJSON ('http://whateverorigin.org/get?url=' + encodeURIComponent (playlistURL) + '&callback=?', function (data) {
			// Parse track list
			g_playlist = parsePlaylist (data.contents);

			// Build HTML table for track listing
			for (var i = 0; i < g_playlist.length; ++i) {
				var track = g_playlist[i];

				var row = $('<tr>').append (
					$('<td>').text (track.creator + ' - ' + track.title)
				);
			
				row.appendTo ('#tracks-table');
				(function (i) {
					row.click (function () {
						playTrack (i);
					});
				}) (i);
			}

			// Begin playing random tracks
			playNextTrack ();
		});
	}

	function playpause () {
		if ($('audio').get (0).paused)
			$('audio').trigger ('play');
		else
			$('audio').trigger ('pause');
	}

	$(function () {
		// Register Events
		$('audio').on ('pause', function () {
			$('#btn-play i').removeClass ('fa-pause');
			$('#btn-play i').addClass ('fa-play');
		});

		$('audio').on ('play', function () {
			$('#btn-play i').removeClass ('fa-play');
			$('#btn-play i').addClass ('fa-pause');
		});

		$('audio').on ('timeupdate', function () {
			if (isNaN (this.duration))
				return;
			if (!is_dragging_scrubber)
				$('#scrubber-progress').css('width', (this.currentTime / this.duration) * 100+'%');
			$('#time-current').text (formatTimecode (this.currentTime));
			$('#time-remaining').text (formatTimecode (this.duration - this.currentTime));
		});

		$('#scrubber-track').on('mousedown mouseup', function(e) {
			is_dragging_scrubber = true;
			var sc_w = $('#scrubber-track').outerWidth();
			var p = ((e.pageX - $('#scrubber-track').offset().left) / sc_w) * 100;
			$('#scrubber-progress').css('width', p+'%');
			scrubp = p;
			$(document).on('mousemove.scrubber-track', function(e) {
				sc_w = $('#scrubber-track').outerWidth();
				p = ((e.pageX - $('#scrubber-track').offset().left) / sc_w) * 100;
				$('#scrubber-progress').css('width', p+'%');
				scrubp = p;
			});
		});

		$(document).on('mouseup.scrubber-track', function(e) {
			if (is_dragging_scrubber) {
				$('audio').get(0).currentTime = (scrubp / 100) * $('audio').get(0).duration;
				$(this).off('mousemove.scrubber-track');
				is_dragging_scrubber = false;
			}
		});

		$('audio').on ('ended', function () {
			playNextTrack ();
		});

		$('#btn-play').click (playpause);

		$(document).keypress (function (e) {
			if (e.which == 32) {
				e.preventDefault ();
				playpause ();
			}
		});

		$('#btn-next').click (function () {
			playNextTrack ();
		});

		$('#btn-previous').click (function () {
			playPreviousTrack ();
		});

		$('#select-playlist').on ('change', function () {
			loadNewPlaylist ();
		});

		// Load current playlist
		loadNewPlaylist ();
	});
</script>

<style>
	html, body, div, span, applet, object, iframe,
	h1, h2, h3, h4, h5, h6, p, blockquote, pre,
	a, abbr, acronym, address, big, cite, code,
	del, dfn, em, img, ins, kbd, q, s, samp,
	small, strike, strong, sub, sup, tt, var,
	b, u, i, center,
	dl, dt, dd, ol, ul, li,
	fieldset, form, label, legend,
	table, caption, tbody, tfoot, thead, tr, th, td,
	article, aside, canvas, details, embed, 
	figure, figcaption, footer, header, hgroup, 
	menu, nav, output, ruby, section, summary,
	time, mark, audio, video {
		margin: 0;
		padding: 0;
		border: 0;
		font-size: 100%;
		font: inherit;
		vertical-align: baseline;
	}
	/* HTML5 display-role reset for older browsers */
	article, aside, details, figcaption, figure, 
	footer, header, hgroup, menu, nav, section {
		display: block;
	}
	body {
		line-height: 1;
		-webkit-user-select: none;
	}
	ol, ul {
		list-style: none;
	}
	blockquote, q {
		quotes: none;
	}
	blockquote:before, blockquote:after,
	q:before, q:after {
		content: '';
		content: none;
	}
	table {
		border-collapse: collapse;
		border-spacing: 0;
	}

	body {
		background-color: #183c63;
	}

	#tracks-table {
		width: 100%;
		margin-top: 18px;
	}

	#tracks-table td {
		background-color: #183c63;
		border: 1px solid #003366;
		color: #FF9148;
		padding: 5px;
		font-family: Helvetica, Arial, sans-serif;
		font-size: 8pt;
		cursor: pointer;
	}

	#tracks-table tr.selected td {
		background-color: #e5874a;
		color: #183c63;
	}

	#tracks-table tr:hover td {
		background-color: #4e91ff;
		color: #183c63;
	}

	.control-bar {
		position: fixed;
		top: 0;
		left: 0;
		width: 100%;
		height: 18px;
		background: linear-gradient(to bottom, rgba(192,204,217,1) 0%, rgba(0,12,25,1) 100%);
	}

	.control-buttons {
		width: 100%;
		height: 100%;
		border-spacing: 1px;
		border-collapse: separate;
	}

	.control-buttons td {
		font-family: Helvetica, Arial, sans-serif;
		font-size: 7pt;
		color: #FF9148;
		border-width: 0px;
		background: linear-gradient(to bottom, rgba(61,99,137,1) 0%, rgba(3,41,79,1) 100%);
		text-align: center;
		cursor: pointer;
		vertical-align: middle;
	}

	.control-buttons td:hover {
		color: #4e91ff;
	}

	.control-button {
		width: 20px;
	}

	.control-volume {
		width: 60px;
		font-size: 9pt;
	}

	.control-playlist {
		width: 80px;
	}

	.control-playlist select {
		height: 16px;
		font-family: Helvetica, Arial, sans-serif;
		font-size: 7pt;
		padding: 0;
		color: #FF9148;
		border: 0;
		background: transparent;
	}

	.credits {
		position: fixed;
		bottom: 0;
		right: 0;
		width: 100px;
		background-color: #000;
		background-color: rgba(0,0,0,0.5);
		color: #FF9148;
		padding: 5px;
		font-family: Helvetica, Arial, sans-serif;
		font-size: 8pt;
		text-align: center;
	}

	.credits a {
		color: #a96030;
		font-family: Helvetica, Arial, sans-serif;
		font-size: 8pt;
		text-decoration: none;
	}

	#time-current, #time-remaining {
		width: 60px;
	}

	#scrubber-track {
		width: 100%;
		height: 5px;
		background: gray;
	}
	#scrubber-progress {
		background: #FF9148;
		height: 100%;
	}
	#scrubber {
		position: relative;
		right: -50%;
		height: 10px;
		width: 6px;
		display: inline-block;
		background: lightgrey;
		-ms-transform: translate(-50%,-25%);
		-webkit-transform: translate(-50%,-25%);
		transform: translate(-50%,-25%);
	}
</style>
</head>
<body>
	<div class='control-bar'>
		<table class='control-buttons' cellpadding="0" cellspacing="0">
			<tr>
				<td id='btn-play' class='control-button'><i class="fa fa-play"></i></td>
				<td id='btn-previous' class='control-button'><i class="fa fa-step-backward"></i></td>
				<td id='btn-next' class='control-button'><i class="fa fa-step-forward"></i></td>
				<td id='time-current'></td>
				<td id='time-bar'><div id="scrubber-track"><div id="scrubber-progress"><div id="scrubber"></div></div></div></td>
				<td id='time-remaining'></td>
				<td class='control-playlist'>
					<select id='select-playlist'>
						<option value='http://vip.aersia.net/roster.xml' selected='selected'>VIP</option>
						<option value='http://vip.aersia.net/roster-mellow.xml'>Mellow</option>
						<option value='http://vip.aersia.net/roster-source.xml'>Source</option>
						<option value='http://vip.aersia.net/roster-exiled.xml'>Exiled</option>
						<option value='http://wap.aersia.net/roster.xml'>WAP</option>
					</select>
				</td>
			</tr>
		</table>
	</div>

	<audio></audio>

	<table id='tracks-table' cellpadding="0" cellspacing="0"></table>

	<div class='credits'>
		<a href="http://aersia.net" target="_blank">playlist by Cats777</a>
	</div>
</body>
</html>

{'fraction_non_alphanumeric': 0.19494456311667174, 'fraction_numerical': 0.026243515410436374, 'mean_word_length': 3.4933729433272394, 'pattern_counts': {'":': 2, '<': 147, '<?xml version=': 0, '>': 149, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 12}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1135939', 'n_tokens_mistral': 8674, 'n_tokens_neox': 7317, 'n_words': 1550}