Closed
Description
I was finding it quite tedious navigating through the AGC scans on ibiblio "by hand", so I knocked up a little HTML page which uses some buttons and some Javascript to make the scans much easier to navigate 😃
<HTML>
<HEAD>
<TITLE>AGC scans viewer</TITLE>
<SCRIPT>
function changeDir(newdir) {
showPage()
}
function showPrevious() {
newpage = parseInt(document.form.pagenum.value) - 1;
if (newpage >= 1) {
changePage(newpage);
}
}
function showNext() {
newpage = parseInt(document.form.pagenum.value) + 1;
if (newpage <= 9999) {
changePage(newpage);
}
}
function changePage(page) {
document.form.pagenum.value = page;
showPage();
}
function showPage() {
page = parseInt(document.form.pagenum.value);
if ((page >= 1) && (page <= 9999)) {
formatted = "000" + page;
formatted = formatted.substr(formatted.length - 4);
imgUrl = "http://www.ibiblio.org/apollo/ScansForConversion/" + document.form.directory.value + "/" + formatted + ".jpg";
document.body.style.cursor = "progress";
document.image.src = imgUrl;
}
}
</SCRIPT>
</HEAD>
<BODY onLoad="showPage()">
<FORM NAME=form onSubmit="return false">
<SELECT NAME="directory" onChange="changeDir(this.value)"><OPTION>Comanche055</OPTION><OPTION>Luminary099</OPTION><SELECT>
<INPUT TYPE=BUTTON onClick="showPrevious()" VALUE="<">
<INPUT TYPE=TEXT NAME=pagenum onChange="changePage(parseInt(this.value))" SIZE=5 MAXLENGTH=4 VALUE=1>
<INPUT TYPE=BUTTON onClick="showNext()" VALUE=">">
</FORM>
<IMG NAME=image onLoad="this.title=this.src;document.body.style.cursor='default'" WIDTH=1314 HEIGHT=1000></IMG>
</BODY>
</HTML>
It doesn't really make sense to submit a PR for this though, as GitHub only displays the source-code of HTML pages, rather than allowing the browser to render the HTML itself. See e.g. https://github.com/lurch/Apollo-11/blob/master/view_scans.html
So if you have somewhere suitable to host this file, then feel free! I release it into the Public Domain so do with it whatever you like.
In a worst-case scenario, you can simply download it onto your computer and open it in your web-browser as a local file (which is exactly how I tested it).