<commit_before><!DOCTYPE html>
<html lang="en">
	<head>
		<title>Hiya</title>
		<meta charset="utf-8" />

		<!--<link rel="stylesheet" href="styles.css" />-->
		<style>
			body {
				width: 500px;
				font-family: Helvetica, Arial;
				font-size: 10pt;
			}

			.header {
				font-size: 20pt;
				margin-bottom: 10px;
			}

			.section {
				margin-bottom: 15px;
			}

			.section .title {
				font-size: 11pt;
				margin-bottom: 4px;
			}

			.box {
				background: #fafafa;
				border: 1px solid #ccc;
				border-radius: 5px;
				box-shadow: 3px 3px 3px #ccc;
				line-height: 150%;
				margin: 0 20px;
				padding: 5px;
			}

			.fieldName {
				font-weight: bold;
			}

			#beaconData {
				background: white;
				border: 1px solid #eee;
				border-radius: 5px;
				display: none;
				font-size: 9pt;
				line-height: 130%;
				margin: 5px 20px 5px 10px;
				padding: 5px;
			}

			#beaconData .fieldValue {
				position: absolute;
				left: 200px;
			}
		</style>

		<script src="shiv/microformats-isodate.min.js"></script>

		<script>
			function main() {
				chrome.tabs.getSelected(null, function(tab) {
					var microformatData = chrome.extension.getBackgroundPage().hNewsData[tab.id];

					document.getElementById('title').innerHTML = (microformatData.hNews.title) ? microformatData.hNews.title : '';
					document.getElementById('author').innerHTML = (microformatData.hNews.author) ? microformatData.hNews.author : '';
					document.getElementById('source').innerHTML = (microformatData.hNews.source) ? microformatData.hNews.source : '';
					document.getElementById('updated').innerHTML = (microformatData.hNews.updated) ? new Date(microformatData.hNews.updated) : '';

					document.getElementById('dateline').innerHTML = (microformatData.hNews.dateline) ? microformatData.hNews.dateline : '';
					document.getElementById('geo').innerHTML = (microformatData.hNews.geo) ? microformatData.hNews.geo.latitude + ", " + microformatData.hNews.geo.longitude : '';
					document.getElementById('principles').innerHTML = (microformatData.hNews.principle) ? microformatData.hNews.principle.link : '';
					document.getElementById('published').innerHTML = (microformatData.hNews.published) ? new Date(microformatData.hNews.published) : '';

					document.getElementById('license').innerHTML = (microformatData.hNews.license) ? microformatData.hNews.license.link : '';

					if (microformatData.apBeacon) {
						document.getElementById('beacon').innerHTML = (microformatData.apBeacon.isValid) ? 'Yes' : 'Invalid';
						document.getElementById('beaconData').style.display = 'block';

						document.getElementById('apCreatorId').innerHTML = (microformatData.apBeacon.creatorId) ? microformatData.apBeacon.creatorId : '';
						document.getElementById('apReleaseWebSite').innerHTML = (microformatData.apBeacon.rws) ? microformatData.apBeacon.rws : '';
						document.getElementById('apCreatorArticleId').innerHTML = (microformatData.apBeacon.cai) ? microformatData.apBeacon.cai : '';
						document.getElementById('apMyArticleId').innerHTML = (microformatData.apBeacon.mai) ? microformatData.apBeacon.mai : '';
						document.getElementById('apCreatorVersionId').innerHTML = (microformatData.apBeacon.cvi) ? microformatData.apBeacon.cvi : '';
						document.getElementById('apEnvironment').innerHTML = (microformatData.apBeacon.e) ? microformatData.apBeacon.e : '';
						document.getElementById('apPermissionCategory').innerHTML = (microformatData.apBeacon.pc) ? microformatData.apBeacon.pc : '';
					} else {
						document.getElementById('beacon').innerHTML = 'No';
					}
				});
			}
		</script>
	</head>

	<body onload="javascript:main()">
		<div class="header">
			<img src="mf_logo.gif" alt=""/>
			hNews Reader
		</div>

		<div class="section">
			<div class="title">hNews required fields:</div>
			<div class="required box">
				<div><span class="fieldName">Headline:</span> <span id="title" class="fieldValue"></span></div>
				<div><span class="fieldName">Byline:</span> <span id="author" class="fieldValue"></span></div>
				<div><span class="fieldName">Source:</span> <span id="source" class="fieldValue"></span></div>
				<div><span class="fieldName">Updated:</span> <span id="updated" class="fieldValue"></span></div>
			</div>
		</div>

		<div class="section">
			<div class="title">hNews optional fields:</div>
			<div class="optional box">
				<div><span class="fieldName">Dateline:</span> <span id="dateline" class="fieldValue"></span></div>
				<div><span class="fieldName">Geo:</span> <span id="geo" class="fieldValue"></span></div>
				<div><span class="fieldName">Principles:</span> <span id="principles" class="fieldValue"></span></div>
				<div><span class="fieldName">Published:</span> <span id="published" class="fieldValue"></span></div>
			</div>
		</div>

		<div class="section">
			<div class="title">AP News Registry required fields:</div>
			<div class="APNR box">
				<div><span class="fieldName">License:</span> <span id="license" class="fieldValue"></span></div>
				<div><span class="fieldName">Usage Tag (beacon):</span> <span id="beacon" class="fieldValue"></span>
					<div id="beaconData">
						<div><span class="fieldName">Creator Id:</span> <span id="apCreatorId" class="fieldValue"></span></div>
						<div><span class="fieldName">Release Web Site:</span> <span id="apReleaseWebSite" class="fieldValue"></span></div>
						<div><span class="fieldName">Creator Article Id:</span> <span id="apCreatorArticleId" class="fieldValue"></span></div>
						<div><span class="fieldName">My Article Id:</span> <span id="apMyArticleId" class="fieldValue"></span></div>
						<div><span class="fieldName">Creator Version Id:</span> <span id="apCreatorVersionId" class="fieldValue"></span></div>
						<div><span class="fieldName">Environment:</span> <span id="apEnvironment" class="fieldValue"></span></div>
						<div><span class="fieldName">Permission Category:</span> <span id="apPermissionCategory" class="fieldValue"></span></div>
						<div><span class="fieldName">Article Type:</span> <span id="apArticleType" class="fieldValue"></span></div>
					</div>
				</div>
			</div>
		</div>
	</body>
</html>
<commit_msg>Remove some legacy stuff...<commit_after><!DOCTYPE html>
<html lang="en">
	<head>
		<title>Hiya</title>
		<meta charset="utf-8" />

		<style>
			body {
				width: 500px;
				font-family: Helvetica, Arial;
				font-size: 10pt;
			}

			.header {
				font-size: 20pt;
				margin-bottom: 10px;
			}

			.section {
				margin-bottom: 15px;
			}

			.section .title {
				font-size: 11pt;
				margin-bottom: 4px;
			}

			.box {
				background: #fafafa;
				border: 1px solid #ccc;
				border-radius: 5px;
				box-shadow: 3px 3px 3px #ccc;
				line-height: 150%;
				margin: 0 20px;
				padding: 5px;
			}

			.fieldName {
				font-weight: bold;
			}

			#beaconData {
				background: white;
				border: 1px solid #eee;
				border-radius: 5px;
				display: none;
				font-size: 9pt;
				line-height: 130%;
				margin: 5px 20px 5px 10px;
				padding: 5px;
			}

			#beaconData .fieldValue {
				position: absolute;
				left: 200px;
			}
		</style>

		<script>
			function main() {
				chrome.tabs.getSelected(null, function(tab) {
					var microformatData = chrome.extension.getBackgroundPage().hNewsData[tab.id];

					document.getElementById('title').innerHTML = (microformatData.hNews.title) ? microformatData.hNews.title : '';
					document.getElementById('author').innerHTML = (microformatData.hNews.author) ? microformatData.hNews.author : '';
					document.getElementById('source').innerHTML = (microformatData.hNews.source) ? microformatData.hNews.source : '';
					document.getElementById('updated').innerHTML = (microformatData.hNews.updated) ? new Date(microformatData.hNews.updated) : '';

					document.getElementById('dateline').innerHTML = (microformatData.hNews.dateline) ? microformatData.hNews.dateline : '';
					document.getElementById('geo').innerHTML = (microformatData.hNews.geo) ? microformatData.hNews.geo.latitude + ", " + microformatData.hNews.geo.longitude : '';
					document.getElementById('principles').innerHTML = (microformatData.hNews.principle) ? microformatData.hNews.principle.link : '';
					document.getElementById('published').innerHTML = (microformatData.hNews.published) ? new Date(microformatData.hNews.published) : '';

					document.getElementById('license').innerHTML = (microformatData.hNews.license) ? microformatData.hNews.license.link : '';

					if (microformatData.apBeacon) {
						document.getElementById('beacon').innerHTML = (microformatData.apBeacon.isValid) ? 'Yes' : 'Invalid';
						document.getElementById('beaconData').style.display = 'block';

						document.getElementById('apCreatorId').innerHTML = (microformatData.apBeacon.creatorId) ? microformatData.apBeacon.creatorId : '';
						document.getElementById('apReleaseWebSite').innerHTML = (microformatData.apBeacon.rws) ? microformatData.apBeacon.rws : '';
						document.getElementById('apCreatorArticleId').innerHTML = (microformatData.apBeacon.cai) ? microformatData.apBeacon.cai : '';
						document.getElementById('apMyArticleId').innerHTML = (microformatData.apBeacon.mai) ? microformatData.apBeacon.mai : '';
						document.getElementById('apCreatorVersionId').innerHTML = (microformatData.apBeacon.cvi) ? microformatData.apBeacon.cvi : '';
						document.getElementById('apEnvironment').innerHTML = (microformatData.apBeacon.e) ? microformatData.apBeacon.e : '';
						document.getElementById('apPermissionCategory').innerHTML = (microformatData.apBeacon.pc) ? microformatData.apBeacon.pc : '';
					} else {
						document.getElementById('beacon').innerHTML = 'No';
					}
				});
			}
		</script>
	</head>

	<body onload="javascript:main()">
		<div class="header">
			<img src="mf_logo.gif" alt=""/>
			hNews Reader
		</div>

		<div class="section">
			<div class="title">hNews required fields:</div>
			<div class="required box">
				<div><span class="fieldName">Headline:</span> <span id="title" class="fieldValue"></span></div>
				<div><span class="fieldName">Byline:</span> <span id="author" class="fieldValue"></span></div>
				<div><span class="fieldName">Source:</span> <span id="source" class="fieldValue"></span></div>
				<div><span class="fieldName">Updated:</span> <span id="updated" class="fieldValue"></span></div>
			</div>
		</div>

		<div class="section">
			<div class="title">hNews optional fields:</div>
			<div class="optional box">
				<div><span class="fieldName">Dateline:</span> <span id="dateline" class="fieldValue"></span></div>
				<div><span class="fieldName">Geo:</span> <span id="geo" class="fieldValue"></span></div>
				<div><span class="fieldName">Principles:</span> <span id="principles" class="fieldValue"></span></div>
				<div><span class="fieldName">Published:</span> <span id="published" class="fieldValue"></span></div>
			</div>
		</div>

		<div class="section">
			<div class="title">AP News Registry required fields:</div>
			<div class="APNR box">
				<div><span class="fieldName">License:</span> <span id="license" class="fieldValue"></span></div>
				<div><span class="fieldName">Usage Tag (beacon):</span> <span id="beacon" class="fieldValue"></span>
					<div id="beaconData">
						<div><span class="fieldName">Creator Id:</span> <span id="apCreatorId" class="fieldValue"></span></div>
						<div><span class="fieldName">Release Web Site:</span> <span id="apReleaseWebSite" class="fieldValue"></span></div>
						<div><span class="fieldName">Creator Article Id:</span> <span id="apCreatorArticleId" class="fieldValue"></span></div>
						<div><span class="fieldName">My Article Id:</span> <span id="apMyArticleId" class="fieldValue"></span></div>
						<div><span class="fieldName">Creator Version Id:</span> <span id="apCreatorVersionId" class="fieldValue"></span></div>
						<div><span class="fieldName">Environment:</span> <span id="apEnvironment" class="fieldValue"></span></div>
						<div><span class="fieldName">Permission Category:</span> <span id="apPermissionCategory" class="fieldValue"></span></div>
						<div><span class="fieldName">Article Type:</span> <span id="apArticleType" class="fieldValue"></span></div>
					</div>
				</div>
			</div>
		</div>
	</body>
</html>

{'fraction_non_alphanumeric': 0.17876729147908652, 'fraction_numerical': 0.007039371367766227, 'mean_word_length': 4.486304445442299, 'pattern_counts': {'":': 0, '<': 297, '<?xml version=': 0, '>': 297, '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': '5179531', 'n_tokens_mistral': 4677, 'n_tokens_neox': 3794, 'n_words': 628}