<!doctype html>
<html>
<head>
<title>Mac OS X Quarter Hour Timer via This Supervising Crontab 0,15,30,45 * * * * /usr/sbin/screencapture -Cd -tjpg /Applications/MAMP/htdocs/screen-`date +"\%Y\%m\%d-\%H\%M"`.jpg</title>

<style>
td { vertical-align: top; }
#divmc { background-color: #ffffff; }
p:not(:empty) { border: 1px dotted red; }
</style>

<script type='text/javascript'>

var odiv=null;
var hprefix="http://localhost:8888/"; // is same as /Applications/MAMP/htdocs/ for local MAMP on Mac OS X
var nexttableo=null;
var nexttdo=null;
var lasthm=-1;
var wo=null;
var thatsit=false;
var fifteen="15";
var cnt=0;
var lastone='#mybod';
var nexttdoid='';
var elem=null;
var context=null;
var img=null;
var isasnapshottodo=0;
var winois=null;
var sfrom='';
var sto='';
var ims=[], imsi=0;
var iimgo=null;
var normok=true;
var isMac = navigator.platform.toUpperCase().indexOf('MAC')>=0; // thanks to http://stackoverflow.com/questions/10527983/best-way-to-detect-mac-os-x-or-windows-computers-with-javascript-or-jquery

function ouralert(insc) {
var isok=true;
if (ims.length == 0) {
ims.push(insc);
setTimeout(dostuff, 5000);
} else {
if (ims[eval(-1 + ims.length)] != insc) {
for (var iiu=0; iiu<ims.length; iiu++) {
if (ims[iiu] == insc) { isok=false; }
}
if (isok) { ims.push(insc); }
}
}
}

function dostuff() {
ims.sort();
for (var iiu=0; iiu<ims.length; iiu++) {
if (iiu == imsi) {
if (imsi == 0) {
//alert(ims.length);
//alert('./quarter_hour_timer.php?myta=&itd_' + ims[iiu].split('screen-')[1].split('.')[0].replace('-','_') + '=');
document.getElementById('ylocit').src='./quarter_hour_timer.php?myta=&itd_' + ims[iiu].split('screen-')[1].split('.')[0].replace('-','_') + '=';
imsi++;
if (imsi == ims.length && document.URL.indexOf('localhost') != -1 && window.opener) { setTimeout(poststuff,3000); }
setTimeout(dostuff, 1000);
} else if (document.getElementById('itd_' + ims[eval(-1 + iiu)].split('screen-')[1].split('.')[0].replace('-','_')).title != ' ') {
//alert('./quarter_hour_timer.php?myta=&itd_' + ims[iiu].split('screen-')[1].split('.')[0].replace('-','_') + '=?');
document.getElementById('ylocit').src='./quarter_hour_timer.php?myta=&itd_' + ims[iiu].split('screen-')[1].split('.')[0].replace('-','_') + '=';
imsi++;
if (imsi == ims.length && document.URL.indexOf('localhost') != -1 && window.opener) { setTimeout(poststuff,3000); }
} else {
setTimeout(dostuff, 1000);
}
}
}
}

function poststuff() {
//alert(document.getElementById('divmc').innerHTML);
window.opener.document.getElementById('divmc').innerHTML=document.getElementById('divmc').innerHTML;
//alert('2:' + document.getElementById('divmc').innerHTML);
}

function closewinois() {
if (winois != null) {
winois.close();
winois=null;
}
if (isasnapshottodo == 1) isasnapshottodo = 2;
}

function aemail(ame) { // thanks to http://www.telerik.com/forums/proper-way-to-do-mailto-and-tel-links(
window.top.location = ame.href;
}

function unoops(imgo) {
//var imgo=document.getElementById(iimgo);
//document.title=imgo.id.replace('i','').replace('_',' ').replace('_',' ');
if (document.getElementById('sfrom').innerHTML.indexOf(imgo.id.replace('i','')) == -1) {
var wasfrom=sfrom;
document.getElementById('sfrom').innerHTML+="<option value='" + imgo.id.replace('i','') + "'>From " + fancy(imgo.id.replace('i','').replace('td_','').replace('_',' ').replace('_',' ')) + "</option>";
document.getElementById('sfrom').value=wasfrom;
}
var xsto=document.getElementById('sto').innerHTML;
if (document.getElementById('sto').innerHTML.indexOf(imgo.id.replace('i','')) == -1) {
var wasto=sto;
document.getElementById('sto').innerHTML=document.getElementById('sto').innerHTML.replace("</option>", "</option><option value='" + imgo.id.replace('i','') + "'>To " + fancy(imgo.id.replace('i','').replace('td_','').replace('_',' ').replace('_',' ')) + "</option>");
document.getElementById('sto').value=wasto;
}
}

function oops(imgo) {
document.getElementById(imgo.id.replace('i','').replace('x','')).style.display='none';
}

function andthenmove() {
if (isasnapshottodo == 0) location.href=lastone;
lastone='#mybod';
if (isasnapshottodo == 2) {
document.getElementById('aemail').click();
isasnapshottodo=0;
document.getElementById('bemail').innerHTML='Email Times';
}
}

function fillinmywork() {
//alert(document.URL);
var ih, iqh;
//alert(870);
var today = new Date();
var dd = today.getDate();
var mm = today.getMonth()+1; //January is 0!
var yyyy = today.getFullYear();
var hh = today.getHours();
var minm = today.getMinutes(); //January is 0!
var ss = 0; //today.getSeconds();
var thirtythousand=30000;


if (("" + ("00" + hh).slice(-2) + "" + ("00" + minm).slice(-2)) == "0000" || !normok) {
thirtythousand=60000;
odiv=null;
cnt++;
}
if (odiv == null) {
if (cnt == 0) {
if (!isMac) {
document.getElementById('myh1').innerHTML=document.getElementById('myh1').innerHTML.replace('Mac OS X ','');
document.getElementById('myh1').innerHTML=document.getElementById('myh1').innerHTML.replace(' Crontab ',' Screen Capture Creator ');
document.getElementById('myh1').innerHTML=document.getElementById('myh1').innerHTML.replace('Ideally suited for MAMP, and left running', 'Ideally suited to being left running');
document.getElementById('myh3').style.display='none';
document.title=document.title.replace('Mac OS X ','');
document.title=document.title.replace(' Crontab ',' Screen Capture Creator ');
document.title=document.title.replace('Ideally suited for MAMP, and left running', 'Ideally suited to being left running');
} else {
document.getElementById('myh1').innerHTML=document.getElementById('myh1').innerHTML.replace('Mac OS X Quarter Hour Timer via This Supervising Crontab ','<span id=macoss onclick=forceissue(); title=" or Mac OS X">macOS</span> <span title="Double click macOS for forced entry outside quarter hour marks">Quarter Hour</span><span style=display:none;> Timer via This Supervising Crontab</span> ');
}
elem = document.getElementById('canvaselement');
context = elem.getContext("2d");
//context.drawImage(img,0,0);
fifteen=(location.search + '&').split('fifteen=')[1] ? location.search.split('fifteen=')[1].split('&')[0] : fifteen;
//alert(document.URL);
hprefix=(location.search + '&').split('localplace=')[1] ? location.search.split('localplace=')[1].split('&')[0] : hprefix;
if (hprefix != "http://localhost" + lportbit + "/") {
document.getElementById('myh3').innerHTML=document.getElementById('myh3').innerHTML.replace('/Applications/MAMP/htdocs/',hprefix).replace("C:\\MAMP\\htdocs\\",hprefix);
} else if (document.URL.indexOf('file:/') == 0) {
hprefix=(document.URL + '/?').substring(7).replace('quarter_hour_timer.html','').replace('//?','/?').split('?')[0];
if (hprefix != "http://localhost" + lportbit + "/" && hprefix != "/Applications/MAMP/htdocs/" && hprefix != "C:\\MAMP\\htdocs\\") {
//alert(hprefix);
document.getElementById('myh3').innerHTML=document.getElementById('myh3').innerHTML.replace('/Applications/MAMP/htdocs/',hprefix);
}
} //else {
//alert(document.URL);
//}
if (hprefix.indexOf(':') == -1) hprefix='file://' + hprefix;
if (hprefix.indexOf('localhost' + lportbit + '') == -1) {
document.getElementById('myh1').innerHTML=document.getElementById('myh1').innerHTML.replace('Ideally suited for MAMP, and left running', 'Ideally suited to being left running');
}
}
odiv=document.getElementById('mywork' + cnt);
} //else if (nexttdo != null) {
//alert(87000 + " " + ("" + hh + "" + minm) + " " + odiv.innerHTML.indexOf('</td>') + "isnot-1? zero=" + eval(eval("" + minm), eval(fifteen)) + "? " + nexttdo.id);
//}
//alert(8700);
//alert(87000);
var itableo = "table_" + yyyy + "" + mm + "" + dd;
var thisdatebit = "Quarter Hour Activities for " + dd + "/" + mm + "/" + yyyy;
var thistimefilename = hprefix + "screen-" + yyyy + "" + ("00" + mm).slice(-2) + "" + ("00" + dd).slice(-2) + "-" + ("00" + hh).slice(-2) + "" + ("00" + minm).slice(-2) + ".jpg";
var thistimebit = "td_" + yyyy + "" + ("00" + mm).slice(-2) + "" + ("00" + dd).slice(-2) + "_" + ("00" + hh).slice(-2) + "" + ("00" + minm).slice(-2);
var vstimefilename; // = hprefix + "screen-" + yyyy + "" + mm + "" + dd + "-" + hh + "" + minm + ".jpg";
var vstimebit; // = hprefix + "screen-" + yyyy + "" + mm + "" + dd + "-" + hh + "" + minm + ".jpg";
//alert(870000 + " " + odiv.innerHTML + " " + ("" + hh + "" + minm));
var ifteen=fifteen;
if (!normok) { ifteen=1; }
if (odiv.innerHTML.indexOf('</td>') != -1 && eval(eval("" + minm) % eval(ifteen)) == 0 && nexttdo != null) {
//alert(870000 + " " + odiv.innerHTML + " " + ("" + hh + "" + minm));
//alert(nexttdo.id);
thatsit=false;
for (ih=0; ih<24; ih++) {
for (iqh=0; iqh<=eval(eval(fifteen) * 3); iqh+=eval(fifteen)) {
vstimefilename = hprefix + "screen-" + yyyy + "" + ("00" + mm).slice(-2) + "" + ("00" + dd).slice(-2) + "-" + ("00" + ih).slice(-2) + "" + ("00" + iqh).slice(-2) + ".jpg";
vstimebit = "td_" + yyyy + "" + ("00" + mm).slice(-2) + "" + ("00" + dd).slice(-2) + "_" + ("00" + ih).slice(-2) + "" + ("00" + iqh).slice(-2);
if (!thatsit) {
if (vstimebit < thistimebit) {
//alert(nexttdo.id + " ... " + vstimefilename + " < " + thistimefilename);
vstimefilename=vstimefilename;
} else if (nexttdo == null) {
//alert("nexttdo.id = null");
nexttdoid=vstimebit;
nexttdo=document.getElementById(vstimebit);
//alert(nexttdo.id + " = " + vstimefilename);
thatsit=true;
} else if (vstimebit == nexttdoid) {
//alert(nexttdo.id + " === " + vstimebit + " ... " + dd + "/" + mm + "/" + yyyy + " " + ("00" + ih).slice(-2) + ":" + ("00" + iqh).slice(-2) + "<br>" + "<img name='i" + vstimebit + "' id='i" + vstimebit + "' onerror='oops(this);' onclick='if (wo != null) { wo.close(); wo=null; } wo=window.open(\"" + vstimefilename + "\",\"" + dd + "/" + mm + "/" + yyyy + " " + ("00" + ih).slice(-2) + ":" + ("00" + iqh).slice(-2) + "\",\"top=50,left=50,width=600,height=600\");' style='width:150px;' src='" + vstimefilename + "'></img><br><textarea style='background-color:#f0f0f0;' rows=5 cols=20></textarea>");
lastone='#' + vstimebit;
nexttdo=document.getElementById(vstimebit);
if (sfrom != '' && sto != '') {
if (vstimebit < sfrom || vstimebit < sto) {
//alert('OOPs');
sfrom=sfrom;
} else {
nexttdo.innerHTML="" + dd + "/" + mm + "/" + yyyy + "<a id=x" + vstimebit + " onclick=oops(this); style=text-decoration:none; title=Delete><strike>-</strike></a>" + ("00" + ih).slice(-2) + ":" + ("00" + iqh).slice(-2) + "<br>" + "<form action=./quarter_hour_timer.php method=POST target=zlocit><input style=display:none; type=submit id=myqsubmit" + vstimebit.replace('td_','screen-').replace('_','-') + " value=Submit name='" + vstimebit.replace('td_','screen-').replace('_','-') + "'></input><img id='i" + vstimebit + "' onerror='oops(this);' onload='unoops(this);' onclick='if (wo != null) { wo.close(); wo=null; } wo=window.open(\"" + vstimefilename + "\",\"" + dd + "/" + mm + "/" + yyyy + " " + ("00" + ih).slice(-2) + ":" + ("00" + iqh).slice(-2) + "\",\"top=50,left=50,width=600,height=600\");' style='width:150px;' src='" + vstimefilename + "'></img><br><textarea name=myta onblur=\"if (this.value.length != 0) { document.getElementById('myqsubmit" + vstimebit.replace('td_','screen-').replace('_','-') + "').click(); }\" style='background-color:#f0f0f0;' rows=5 cols=20></textarea></form>";
}
} else if (sfrom != '') {
if (vstimebit < sfrom) {
//alert('OOps');
sfrom=sfrom;
} else {
nexttdo.innerHTML="" + dd + "/" + mm + "/" + yyyy + "<a id=x" + vstimebit + " onclick=oops(this); style=text-decoration:none; title=Delete><strike>-</strike></a>" + ("00" + ih).slice(-2) + ":" + ("00" + iqh).slice(-2) + "<br>" + "<form action=./quarter_hour_timer.php method=POST target=zlocit><input style=display:none; type=submit id=myqsubmit" + vstimebit.replace('td_','screen-').replace('_','-') + " value=Submit name='" + vstimebit.replace('td_','screen-').replace('_','-') + "'></input><img id='i" + vstimebit + "' onerror='oops(this);' onload='unoops(this);' onclick='if (wo != null) { wo.close(); wo=null; } wo=window.open(\"" + vstimefilename + "\",\"" + dd + "/" + mm + "/" + yyyy + " " + ("00" + ih).slice(-2) + ":" + ("00" + iqh).slice(-2) + "\",\"top=50,left=50,width=600,height=600\");' style='width:150px;' src='" + vstimefilename + "'></img><br><textarea name=myta onblur=\"if (this.value.length != 0) { document.getElementById('myqsubmit" + vstimebit.replace('td_','screen-').replace('_','-') + "').click(); }\" style='background-color:#f0f0f0;' rows=5 cols=20></textarea></form>";
}
} else if (sto != '') {
if (vstimebit > sto) {
//alert('oops');
sfrom=sfrom;
} else {
nexttdo.innerHTML="" + dd + "/" + mm + "/" + yyyy + "<a id=x" + vstimebit + " onclick=oops(this); style=text-decoration:none; title=Delete><strike>-</strike></a>" + ("00" + ih).slice(-2) + ":" + ("00" + iqh).slice(-2) + "<br>" + "<form action=./quarter_hour_timer.php method=POST target=zlocit><input style=display:none; type=submit id=myqsubmit" + vstimebit.replace('td_','screen-').replace('_','-') + " value=Submit name='" + vstimebit.replace('td_','screen-').replace('_','-') + "'></input><img id='i" + vstimebit + "' onerror='oops(this);' onload='unoops(this);' onclick='if (wo != null) { wo.close(); wo=null; } wo=window.open(\"" + vstimefilename + "\",\"" + dd + "/" + mm + "/" + yyyy + " " + ("00" + ih).slice(-2) + ":" + ("00" + iqh).slice(-2) + "\",\"top=50,left=50,width=600,height=600\");' style='width:150px;' src='" + vstimefilename + "'></img><br><textarea name=myta onblur=\"if (this.value.length != 0) { document.getElementById('myqsubmit" + vstimebit.replace('td_','screen-').replace('_','-') + "').click(); }\" style='background-color:#f0f0f0;' rows=5 cols=20></textarea></form>";
}
} else {
nexttdo.innerHTML="" + dd + "/" + mm + "/" + yyyy + "<a id=x" + vstimebit + " onclick=oops(this); style=text-decoration:none; title=Delete><strike>-</strike></a>" + ("00" + ih).slice(-2) + ":" + ("00" + iqh).slice(-2) + "<br>" + "<form action=./quarter_hour_timer.php method=POST target=zlocit><input style=display:none; type=submit id=myqsubmit" + vstimebit.replace('td_','screen-').replace('_','-') + " value=Submit name='" + vstimebit.replace('td_','screen-').replace('_','-') + "'></input><img id='i" + vstimebit + "' onerror='oops(this);' onload='unoops(this);' onclick='if (wo != null) { wo.close(); wo=null; } wo=window.open(\"" + vstimefilename + "\",\"" + dd + "/" + mm + "/" + yyyy + " " + ("00" + ih).slice(-2) + ":" + ("00" + iqh).slice(-2) + "\",\"top=50,left=50,width=600,height=600\");' style='width:150px;' src='" + vstimefilename + "'></img><br><textarea name=myta onblur=\"if (this.value.length != 0) { document.getElementById('myqsubmit" + vstimebit.replace('td_','screen-').replace('_','-') + "').click(); }\" style='background-color:#f0f0f0;' rows=5 cols=20></textarea></form>";
}
thirtythousand=60000;
if (isasnapshottodo == 1) {
document.getElementById('myimage').src=vstimefilename;
}
setTimeout(andthenmove, 15000);
//alert(nexttdo.id + " =+= " + vstimebit);
nexttdo=null;
}
}
}
}
} else if (odiv.innerHTML == "" || ("" + ("00" + hh).slice(-2) + "" + ("00" + minm).slice(-2)) == "0000" || !normok) {
odiv.innerHTML += "<div id='mywork" + eval(cnt + 1) + "' style='text-align:center; width:100%;'></div><br><h2 style='text-align:center; width:100%;'>" + thisdatebit + "</h2><table id='" + itableo + "' style='background-color:pink;text-align:center; width:100%;'><tr><tbody><th colspan=8>" + thisdatebit + "</th></tr></tbody></table>";
nexttableo=document.getElementById(itableo);
nexttdo=null;
for (ih=0; ih<24; ih++) {
if (eval(ih % 2) == 0) nexttableo.innerHTML=nexttableo.innerHTML.replace("</tbody>", "<tr></tr></tbody>");
var ffv=45;
var ffi=15;
//if (!normok) { ffv=59; ffi=1; }
for (iqh=0; iqh<=ffv; iqh+=ffi) {
vstimefilename = hprefix + "screen-" + yyyy + "" + ("00" + mm).slice(-2) + "" + ("00" + dd).slice(-2) + "-" + ("00" + ih).slice(-2) + "" + ("00" + iqh).slice(-2) + ".jpg";
vstimebit = "td_" + yyyy + "" + ("00" + mm).slice(-2) + "" + ("00" + dd).slice(-2) + "_" + ("00" + ih).slice(-2) + "" + ("00" + iqh).slice(-2);
//alert(vstimefilename + ' ... ' + vstimebit);
if (!normok) {
vstimefilename = hprefix + "screen-" + yyyy + "" + ("00" + mm).slice(-2) + "" + ("00" + dd).slice(-2) + "-" + ("00" + hh).slice(-2) + "" + ("00" + minm).slice(-2) + ".jpg";
vstimebit = "td_" + yyyy + "" + ("00" + mm).slice(-2) + "" + ("00" + dd).slice(-2) + "_" + ("00" + hh).slice(-2) + "" + ("00" + minm).slice(-2);
//alert('674 ' + nexttableo.innerHTML);
nexttableo.innerHTML=nexttableo.innerHTML.replace("</tr></tbody>", "<td id='" + thistimebit + "'>" + dd + "/" + mm + "/" + yyyy + "<a id=x" + thistimebit + " onclick=oops(this); style=text-decoration:none; title=Delete><strike>-</strike></a>" + ("00" + hh).slice(-2) + ":" + ("00" + minm).slice(-2) + "<br>" + "<form action=./quarter_hour_timer.php method=POST target=zlocit><input style=display:none; type=submit id=myqsubmit" + thistimebit.replace('td_','screen-').replace('_','-') + " value=Submit name='" + thistimebit.replace('td_','screen-').replace('_','-') + "'></input><img title=' ' onload=ouralert(this.src); id='i" + thistimebit + "' onerror='oops(this);' onload='unoops(this);' onclick='if (wo != null) { wo.close(); wo=null; } wo=window.open(\"" + vstimefilename + "\",\"" + dd + "/" + mm + "/" + yyyy + " " + ("00" + hh).slice(-2) + ":" + ("00" + minm).slice(-2) + "\",\"top=50,left=50,width=600,height=600\");' style='width:150px;' src='" + vstimefilename + "'></img><br><textarea name=myta onblur=\"if (this.value.length != 0) { document.getElementById('myqsubmit" + thistimebit.replace('td_','screen-').replace('_','-') + "').click(); }\" style='background-color:#f0f0f0;' rows=5 cols=20 id='ta" + thistimebit + "'></textarea></form></td></tr></tbody>");
setTimeout(andthenmove, 15000);
normok=true;
//alert('675 ' + nexttableo.innerHTML);
return;
} else if (vstimebit < thistimebit) {
//alert('Oops');
nexttableo.innerHTML=nexttableo.innerHTML.replace("</tr></tbody>", "<td id='" + vstimebit + "'>" + dd + "/" + mm + "/" + yyyy + "<a id=x" + vstimebit + " onclick=oops(this); style=text-decoration:none; title=Delete><strike>-</strike></a>" + ("00" + ih).slice(-2) + ":" + ("00" + iqh).slice(-2) + "<br>" + "<form action=./quarter_hour_timer.php method=POST target=zlocit><input style=display:none; type=submit id=myqsubmit" + vstimebit.replace('td_','screen-').replace('_','-') + " value=Submit name='" + vstimebit.replace('td_','screen-').replace('_','-') + "'></input><img title=' ' onload=ouralert(this.src); id='i" + vstimebit + "' onerror='oops(this);' onload='unoops(this);' onclick='if (wo != null) { wo.close(); wo=null; } wo=window.open(\"" + vstimefilename + "\",\"" + dd + "/" + mm + "/" + yyyy + " " + ("00" + ih).slice(-2) + ":" + ("00" + iqh).slice(-2) + "\",\"top=50,left=50,width=600,height=600\");' style='width:150px;' src='" + vstimefilename + "'></img><br><textarea name=myta onblur=\"if (this.value.length != 0) { document.getElementById('myqsubmit" + vstimebit.replace('td_','screen-').replace('_','-') + "').click(); }\" style='background-color:#f0f0f0;' rows=5 cols=20 id='ta" + vstimebit + "'></textarea></form></td></tr></tbody>");
lastone='#' + vstimebit;
} else if (vstimebit == thistimebit) {
//alert('oOps');
lastone='#' + vstimebit;
nexttableo.innerHTML=nexttableo.innerHTML.replace("</tr></tbody>", "<td id='" + vstimebit + "'>" + dd + "/" + mm + "/" + yyyy + "<a id=x" + vstimebit + " onclick=oops(this); style=text-decoration:none; title=Delete><strike>-</strike></a>" + ("00" + ih).slice(-2) + ":" + ("00" + iqh).slice(-2) + "<br>" + "<form action=./quarter_hour_timer.php method=POST target=zlocit><input style=display:none; type=submit id=myqsubmit" + vstimebit.replace('td_','screen-').replace('_','-') + " value=Submit name='" + vstimebit.replace('td_','screen-').replace('_','-') + "'></input><img title=' ' onload=ouralert(this.src); id='i" + vstimebit + "' onerror='oops(this);' onload='unoops(this);' onclick='if (wo != null) { wo.close(); wo=null; } wo=window.open(\"" + vstimefilename + "\",\"" + dd + "/" + mm + "/" + yyyy + " " + ("00" + ih).slice(-2) + ":" + ("00" + iqh).slice(-2) + "\",\"top=50,left=50,width=600,height=600\");' style='width:150px;' src='" + vstimefilename + "'></img><br><textarea name=myta onblur=\"if (this.value.length != 0) { document.getElementById('myqsubmit" + vstimebit.replace('td_','screen-').replace('_','-') + "').click(); }\" style='background-color:#f0f0f0;' rows=5 cols=20 id='ta" + vstimebit + "'></textarea></form></td></tr></tbody>");
} else if (nexttdo == null) {
//alert('ooPs');
nexttableo.innerHTML=nexttableo.innerHTML.replace("</tr></tbody>", "<td id='" + vstimebit + "'></td></tr></tbody>");
nexttdoid=vstimebit;
nexttdo=document.getElementById(vstimebit);
//alert(nexttdo.id + ' has innerHTML=' + nexttdo.innerHTML);
} else {
//alert('oopS');
nexttableo.innerHTML=nexttableo.innerHTML.replace("</tr></tbody>", "<td id='" + vstimebit + "'></td></tr></tbody>");
}
}
}
setTimeout(andthenmove, 15000);
} //else {
//document.title=nexttdoid;
//}

if (normok) { setTimeout(fillinmywork, thirtythousand); }
normok=true;
}

function fancy(inc) {
return inc.substring(6,8) + "/" + inc.substring(4,6) + "/" + inc.substring(0,4) + "-" + inc.slice(-4).substring(0,2) + ":" + inc.slice(-2);
}

function ionload(ithis) {
img=ithis; //document.getElementById('myimage');
elem = document.getElementById('canvaselement');
context = elem.getContext("2d");
elem.style.display='block';
context.drawImage(img,0,0);
var canvuri = elem.toDataURL("image/png",0);
elem.style.display='none';
alert('When new window with screen capture opens after this ... Command-A or Ctrl-A (for Select All) and Command-C or Ctrl-C (for Copy) ... new window will close in 5 seconds');
winois=window.open('','_blank','top=3,left=3,width=1600,height=1200');
winois.document.write('<html><body><img src=' + canvuri + '></img></body></html>');
setTimeout(closewinois, 5000);
}

function showhowevermany() {
if (sfrom != '' || sto != '') {
var tds=document.getElementsByTagName('td');
for (var itds=0; itds<tds.length; itds++) {
if (sfrom != '' && sto != '') {
if (tds[itds].id != '') {
if (tds[itds].id < sfrom || tds[itds].id > sto) {
tds[itds].style.display='none';
}
}
} else if (sfrom != '') {
if (tds[itds].id != '') {
if (tds[itds].id < sfrom) {
tds[itds].style.display='none';
}
}
} else if (sto != '') {
if (tds[itds].id != '') {
if (tds[itds].id > sto) {
tds[itds].style.display='none';
}
}
}
}
}
}

var lportbit=getOS(':8888');
var imgn='imgm' + Math.floor(Math.random() * 1987656453) + '.gif';
var tryit='HTTP://localhost' + lportbit + '/' + imgn;
var thatone='', thattwo='';
var wowowo=null;

function getOS(inlp) {
var OSName = "Win Unknown";
if (window.navigator.userAgent.indexOf("Windows NT 11.0")!= -1) OSName="Windows 11";
if (window.navigator.userAgent.indexOf("Windows NT 10.0")!= -1) OSName="Windows 10";
if (window.navigator.userAgent.indexOf("Windows NT 6.3") != -1) OSName="Windows 8.1";
if (window.navigator.userAgent.indexOf("Windows NT 6.2") != -1) OSName="Windows 8";
if (window.navigator.userAgent.indexOf("Windows NT 6.1") != -1) OSName="Windows 7";
if (window.navigator.userAgent.indexOf("Windows NT 6.0") != -1) OSName="Windows Vista";
if (window.navigator.userAgent.indexOf("Windows NT 5.1") != -1) OSName="Windows XP";
if (window.navigator.userAgent.indexOf("Windows NT 5.0") != -1) OSName="Windows 2000";
if (window.navigator.userAgent.indexOf("Mac") != -1) OSName="Mac/iOS";
if (window.navigator.userAgent.indexOf("X11") != -1) OSName="UNIX";
if (window.navigator.userAgent.indexOf("Linux") != -1) OSName="Linux";
if (OSName.substring(0,3).toLowerCase() == 'win') { inlp=''; }
return inlp;
}

function calledlater() {
if (tryit != '') {
if (!inIframe() && document.URL.indexOf('https:') == 0 && document.URL.indexOf('localhost') == -1 && navigator.userAgent.toLowerCase().indexOf('safari/') > -1) {
location.href=document.URL.replace('https:','http:');
}
}
}

function windowopen(theone, thetwo) {
var asu=('&' + document.URL.replace(document.URL.split('?')[0],'').replace('?','')).replace(/^\&$/g,'');
wowowo=window.open('HTTP://localhost' + lportbit + '/HTMLCSS/quarter_hour_timer.html?imgname=' + imgn + asu,'xxlocit');
thatone=theone;
thattwo=thetwo;
setTimeout(postwo, 4000);
}

function postwo() {
if (tryit.trim() == tryit) {
return null;
}
wowo=window.open(thatone, thattwo);
}

function inIframe () { // thanks to https://stackoverflow.com/questions/326069/how-to-identify-if-a-webpage-is-being-loaded-inside-an-iframe-or-directly-into-t
try {
return window.self !== window.top;
} catch (e) {
return true;
}
}

function mamptry() {
if (!inIframe()) { if (document.URL.indexOf('httJUNKp:') == 0) { wowo=window.open('HTTP:/localhost' + lportbit + '/HTMLCSS/quarter_hour_timer.html','mamptry'); document.getElementById('mamptry').style.display='block'; } else if (document.URL.indexOf('localhost') == -1) { windowopen('HTTP:/localhost' + lportbit + '/HTMLCSS/quarter_hour_timer.html','blank'); } }
}


if ((location.search.split('imgname=')[1] ? (decodeURIComponent(location.search.split('imgname=')[1]).split('&')[0]) : '')) {
var asu=((document.URL.replace(document.URL.split('?')[0],'')).replace('?','').replace('&','?') + '?');
asu=('?' + asu.split('?')[1]).replace(/^\?$/g,'');
if (document.URL.indexOf('localhost') != -1) { window.open(document.URL.split('?')[0] + asu,'_blank'); }
}

function forceissue() {
var d1 = new Date();
if (document.URL.indexOf('localhost') != -1 && d1.toUTCString().replace(':15:',':00:').replace(':30:',':00:').replace(':45:',':00:').replace(':07 ',':08 ').replace(':09 ',':08 ').indexOf(':00:08 ') != -1) {
document.getElementById('xxxxlocit').src=document.URL.replace('.html','.php').replace('.htm','.php').split('?')[0] + '?rand=' + Math.floor(Math.random() * 1987656432);
} else {
document.getElementById('xxxxlocit').src=document.URL.replace('.html','.php').replace('.htm','.php').split('?')[0] + '?rand=' + Math.floor(Math.random() * 1987656432);
normok=false;
fillinmywork();
}
}

function lookforfifteen() {
var d1 = new Date();
if (document.URL.indexOf('localhost') != -1 && d1.toUTCString().replace(':15:',':00:').replace(':30:',':00:').replace(':45:',':00:').replace(':07 ',':08 ').replace(':09 ',':08 ').indexOf(':00:08 ') != -1) {
forceissue(); // document.getElementById('xxxxlocit').src=document.URL.replace('.html','.php').replace('.htm','.php').split('?')[0] + '?rand=' + Math.floor(Math.random() * 1987656432);
setTimeout(lookforfifteen, 5000);
} else {
setTimeout(lookforfifteen, 1000);
}
}

function mc(iois) {
if (iois != null) {
if (iois.src.indexOf('monthly_chronicler.htm') != -1) {
var aconto = (iois.contentWindow || iois.contentDocument);
if (aconto != null) {
if (aconto.document) { aconto = aconto.document; }
if (aconto.body != null) {
document.getElementById('divmc').innerHTML=aconto.body.innerHTML + '<br>';
}
}
}
}
}

setTimeout(calledlater, 2000);
setTimeout(lookforfifteen, 1000);

</script>

</head>
<body id='mybod' onload=" fillinmywork(); setTimeout(mamptry,9000); " style='background-color:yellow;'>
<h1 id='myh1' style='text-align:center; width:100%;'>Mac OS X Quarter Hour Timer via This Supervising Crontab (Ideally suited for MAMP, and left running) - RJM Programming - June, 2016</h1>
<h3 id='myh3' style='text-align:center; width:100%;visibility:hidden;' title='Old crontab ideas'>$ sudo crontab -e</br>/usr/bin/php /Applications/MAMP/htdocs/HTMLCSS/quarter_hour_timer.php # 0,15,30,45 * * * * /usr/sbin/screencapture -Cd -tjpg /Applications/MAMP/htdocs/screen-`date +"\%Y\%m\%d-\%H\%M"`.jpg</h3>
<h4 style='text-align:center; width:100%;'>Optionally fill in your Name: <input style='width:20%;' type='text' id='yourname' value=''></input> <a id="bemail" onclick=" isasnapshottodo=true; alert('Please be back here at ' + fancy(nexttdoid.replace('td_','').replace('_',':')) + ' and have showing whatever you want to email and you will be directed on how to select copy and paste this screencapture into an email.'); this.innerHTML='Email Times back here at ' + fancy(nexttdoid.replace('td_','').replace('_',':')); " style=' text-decoration:underline; '>Email Times</a> <select id=sfrom onchange=" sfrom=this.value; document.getElementById('myshow').style.display='inline'; "><option value=''>From Earliest Below ...</option></select> <select id=sto onchange=" sto=this.value; document.getElementById('myshow').style.display='inline'; "><option value=''>To Latest Below ...</option></select> <input onclick=showhowevermany(); type=button id=myshow value=Show style=display:none;></input></h4>
<details><summary style=background-color:orange;>Yearly Report Calendar</summary><div id=divmc style=display:block;></div></details><div id='mywork0' style='text-align:center; width:100%;'></div>
<form id='iemail' src='http://www.rjmprogramming.com.au/HTMLCSS/quarter_hour_timer.php' method='POST' style='display:none;'>
<input type='submit' id='mysubmitemail' value='Email' style='display:none;'></input>
</form>
<canvas id="canvaselement" width=1600 height=1200 style="position: absolute; top:0; left:0; display:none; "></canvas>
<a id='aemail' onclick=' if (navigator.userAgent.match(/Android/i)) { aemail(this); } ' href='mailto:fillin@email.to?subject=My%20Times%20as%20Image%20Below' title='Email' style='display:none;'></a>
<img id='myimage' onload='ionload(this);' src='' onerror=' lastone=lastone; ' style='display:none; z-index:4; ' crossOrigin="Anonymous"></img>
<iframe style=display:none;width:100%;height:900px; name=mamptry id=mamptry src=><iframe name=xxlocit id=xxlocit style='display:none;' src=></iframe><iframe name=xxxxlocit id=xxxxlocit style='display:none;' src=></iframe><iframe name=zlocit id=zlocit style='display:none;' src=></iframe><iframe name=ylocit id=ylocit style='display:none;' src=></iframe><iframe onload=mc(this); name=mclocit id=mclocit style='display:none;' src=./monthly_chronicler.html></iframe>
</body>
</html>