<!doctype html>
<meta charset="utf-8">
<title>Redirecting...</title>
<script>
(function () {
var target = document.location.pathname.match(/(\d+)$/)[1];
var url = 'http://archive.foolz.us/api/chan/post/?board=a&num='+target;
var req = new XMLHttpRequest();
req.open('GET', url, true);
req.overrideMimeType('application/json');
req.onreadystatechange = function () {
	if (req.readyState != 4)
		return;
	if (req.status != 200)
		return bail();
	var resp;
	try {
		resp = JSON.parse(req.responseText);
	}
	catch (e) {
		return bail();
	}
	if (!resp)
		return bail();
	var thread = resp.thread_num, post = resp.num;
	if (typeof thread != 'string' || typeof post != 'string')
		return bail();
	if (!thread.match(/^\d{1,10}$/) || !post.match(/^\d{1,10}$/))
		return bail();
	jump(thread, post);
};
function jump(thread, post) {
	var href = 'http://boards.4chan.org/a/res/'+thread;
	document.location = post ? href+'#p'+post : href;
}
function bail() { jump(target); }
if (req.readyState != 4)
	req.send();
})();
</script>
Redirecting...

<!doctype html>
<meta charset="utf-8">
<title>Redirecting...</title>
<script>
(function () {
var target = document.location.pathname.match(/(\d+)$/)[1];
var url = 'http://archive.foolz.us/_/api/chan/post/?board=a&num='+target;
var req = new XMLHttpRequest();
req.open('GET', url, true);
req.overrideMimeType('application/json');
req.onreadystatechange = function () {
	if (req.readyState != 4)
		return;
	if (req.status != 200)
		return bail();
	var resp;
	try {
		resp = JSON.parse(req.responseText);
	}
	catch (e) {
		return bail();
	}
	if (!resp)
		return bail();
	var thread = resp.thread_num, post = resp.num;
	if (typeof thread != 'string' || typeof post != 'string')
		return bail();
	if (!thread.match(/^\d{1,10}$/) || !post.match(/^\d{1,10}$/))
		return bail();
	jump(thread, post);
};
function jump(thread, post) {
	var href = 'http://boards.4chan.org/a/res/'+thread;
	document.location = post ? href+'#p'+post : href;
}
function bail() { jump(target); }
if (req.readyState != 4)
	req.send();
})();
</script>
Redirecting...

Fix /a/ lookup API endpoint
Fix /a/ lookup API endpoint
