<html>
<head>
<title>Button Innards - RJM Programming - August, 2025</title>
<script type=text/javascript>
var ulli=true, utable=false, locationhref='', xlocationhref='', locationhash='', firstgo=true, recipient='';
var mysubject='My Button Innards ...';
if (('' + location.hash).indexOf('bmkdata=') != -1) { locationhash=location.hash; }
function checkitout() {
//if (!ulli) { alert(1); utable=true; } else { alert(2); utable=false; }
if (('' + document.title + 'x').substring(0,1) == '*') { ulli=false; utable=true; } else { utable=false; ulli=true; }
if (document.getElementById('bmkdata').value.trim() != '') {
//alert('ulli=' + ulli + ' and utable=' + utable);
if (ulli && !utable) {
locationhash='#bmkdata=' + window.btoa(encodeURIComponent(document.getElementById('bmkdata').value));
locationhref=document.URL.split('?')[0].split('#')[0] + '?ulli=y&dtone=' + encodeURIComponent(document.getElementById('dtone').value) + '&dttwo=' + encodeURIComponent(document.getElementById('dttwo').value); // + '#bmkdata=' + encodeURIComponent(document.getElementById('bmkdata').value);
processit();
} else if (utable) {
//alert(98);
locationhash='#bmkdata=' + window.btoa(encodeURIComponent(document.getElementById('bmkdata').value));
locationhref=document.URL.split('?')[0].split('#')[0] + '?utable=y&dtone=' + encodeURIComponent(document.getElementById('dtone').value) + '&dttwo=' + encodeURIComponent(document.getElementById('dttwo').value); // + '#bmkdata=' + encodeURIComponent(document.getElementById('bmkdata').value);
processit();
}
} else {
//alert(897);
locationhash='#bmkdata=' + window.btoa(encodeURIComponent(document.getElementById('bmkdata').value));
locationhref=document.URL.split('?')[0].split('#')[0] + '?utable=y&dtone=' + encodeURIComponent(document.getElementById('dtone').value) + '&dttwo=' + encodeURIComponent(document.getElementById('dttwo').value); // + '#bmkdata=' + encodeURIComponent(document.getElementById('bmkdata').value);
processit();
}
return false;
}
function processit() {
var dfactor=1, thisd=0;
var odtone=null, odttwo=null;
var hrefdelim=' href=', nextchar='', isokay=true, withinstart=-1, withinend=Math.floor(eval(0 + eval('' + (new Date()).getTime())) / dfactor);
var rout='';
if (('' + locationhash).indexOf('bmkdata=') != -1) {
if (('' + location.search + locationhref).indexOf('ulli=') != -1) { ulli=true; }
if (('' + location.search + locationhref).indexOf('table=') != -1) { utable=true; }
var lhbit=decodeURIComponent(window.atob(('' + locationhash).split('bmkdata=')[1]));
var adddates=('' + lhbit).split(' ADD_DATE=');
if (eval('' + adddates.length) > 1) {
nextchar=(adddates[1].substring(0,1) == '"' ? '"' : (adddates[1].substring(0,1) == "'" ? "'" : ' '));
if (nextchar.trim() == '') {
nextchar=' ';
addhrefs=('' + lhbit).replace(/\>/g,nextchar + '>').split(hrefdelim + nextchar);
} else {
adddates=('' + lhbit).split(' ADD_DATE=' + nextchar);
}
if (eval('' + adddates.length) > 1) {
var onetime=adddates[1].split(nextchar)[0];
//alert('onetime=' + onetime + ' and withinend=' + withinend);
while (eval(('' + withinend).length) > eval('' + onetime.length)) {
dfactor*=10;
withinend=Math.round(eval(withinend / 10));
//alert('Onetime=' + onetime + ' and Withinend=' + withinend);
}
}
if (lhbit.indexOf(' HREF=') != -1) {
hrefdelim=' HREF=';
} else if (lhbit.indexOf(' Href=') != -1) {
hrefdelim=' Href=';
}
}
var addhrefs=('' + lhbit).split(hrefdelim + nextchar);
var dtone=('' + location.search + locationhref).split('dtone=')[1] ? decodeURIComponent(('' + location.search + locationhref).split('dtone=')[1].split('&')[0]) : '';
var dttwo=('' + location.search + locationhref).split('dttwo=')[1] ? decodeURIComponent(('' + location.search + locationhref).split('dttwo=')[1].split('&')[0]) : '';
if (dtone.trim() != '') {
odtone=new Date(dtone);
withinstart=Math.floor(eval(0 + eval('' + odtone.getTime())) / dfactor);
}
if (dttwo.trim() != '') {
odttwo=new Date(dttwo);
withinend=Math.floor(eval(0 + eval('' + odttwo.getTime())) / dfactor);
}
//alert('dtone=' + dtone + ' and dttwo=' + dttwo + ' and withinstart=' + withinstart + ' and withinend=' + withinend);
ulli=('' + location.search + locationhref).split('ulli=')[1] ? true : false;
utable=('' + location.search + locationhref).split('table=')[1] ? true : false;
for (var ij=1; ij<addhrefs.length; ij++) {
thisd=0;
if (eval('' + adddates.length) > 1) {
thisd=eval('' + adddates[ij].split(nextchar)[0]);
}
if (thisd >= withinstart && thisd <= withinend) {
if (rout == '') {
if (ulli && !utable) {
rout='<h2><details title="Click me to see actual links displayed and actionable." style=display:inline-block; onclick=fillin(); id=rd><summary id=rs>Results</summary></details><span> below ...</span></h2><br><textarea id=rt><ul>' + String.fromCharCode(10) + '</ul></textarea><br><hr></hr>';
} else if (utable) {
rout='<h2><details title="Click me to see actual links displayed and actionable." style=display:inline-block; onclick=fillin(); id=rd><summary id=rs>Results</summary></details><span> below ...</span></h2><br><textarea id=rt><table>' + String.fromCharCode(10) + '</table></textarea><br><hr></hr>';
}
}
isokay=true;
if (isokay) {
if ((ulli && !utable) || xlocationhref.indexOf('ulli=') != -1) {
rout=rout.replace('</ul>', '<li><a target=_blank title="' + addhrefs[ij].split('>')[1].split('</')[0].replaceAll(/\<\;.*\>\;/g, "").replace(/\"/g,'`').replace(/\</g,'<').replace(/\>/g,'>') + '" href="' + addhrefs[ij].split(nextchar)[0] + '">' + addhrefs[ij].split('>')[1].split('</')[0].replaceAll(/\<\;.*\>\;/g, "").replace(/\</g,'<').replace(/\>/g,'>') + '</a></li>' + String.fromCharCode(10) + '</ul>')
} else if (utable || xlocationhref.indexOf('table=') != -1) {
rout=rout.replace('</table>', '<tr><td><a target=_blank title="' + addhrefs[ij].split('>')[1].split('</')[0].replaceAll(/\<\;.*\>\;/g, "").replace(/\"/g,'`').replace(/\</g,'<').replace(/\>/g,'>') + '" href="' + addhrefs[ij].split(nextchar)[0] + '">' + addhrefs[ij].split('>')[1].split('</')[0].replaceAll(/\<\;.*\>\;/g, "").replace(/\</g,'<').replace(/\>/g,'>') + '</a></td></tr>' + String.fromCharCode(10) + '</table>')
}
}
}
}
//alert(withinend + ' ... more to do ' + addhrefs.length + ' ' + locationhref);
if (rout != '') {
document.getElementById('resulting').innerHTML=rout;
if ((ulli && !utable) || xlocationhref.indexOf('ulli=') != -1) {
document.getElementById('resulting').title='Web browser Bookmark export content filtered, as necessary, here, into Unordered List (you could copy/paste) ...';
} else if (utable || xlocationhref.indexOf('table=') != -1) {
document.getElementById('resulting').title='Web browser Bookmark export content filtered, as necessary, here, into Table (you could copy/paste) ...';
}
if (recipient != '') {
if (recipient.indexOf('@') != -1) {
document.getElementById('spareshare').href='mailto:' + recipient.replace(/\ /g,'') + '?subject=' + encodeURIComponent(mysubject) + '&body=' + encodeURIComponent(xlocationhref.split('?')[0].split('#')[0] + '#bmkdata=' + encodeURIComponent(rout));
document.getElementById('spareshare').click();
recipient='';
} else {
document.getElementById('spareshare').href='sms:' + recipient.replace(/\ /g,'') + '&body=' + encodeURIComponent(xlocationhref.split('?')[0].split('#')[0] + '#bmkdata=' + encodeURIComponent(rout));
document.getElementById('spareshare').click();
recipient='';
}
}
} else if (withinstart != -1) {
document.getElementById('resulting').innerHTML=' ' + eval(eval(withinend - withinstart) / 1000.0) + ' seconds.<br><br>';
} else {
document.getElementById('resulting').innerHTML='Sorry ... nothing found.<br><br>';
}
}
xlocationhref='';
}
if (document.URL.replace('table=', 'ulli=').indexOf('ulli=') != -1) {
processit();
}
if (document.URL.indexOf('?') == -1 && ('' + location.hash).indexOf('bmkdata=') != -1) {
setTimeout(function(){
document.getElementById('resulting').innerHTML=decodeURIComponent(('' + location.hash).split('bmkdata=')[1]).replace('><summary', ' open><summary').replace('<details title=', '<details data-title=');
fillin();
}, 5000);
}
</script>
</head>
<body>
<h1>Button Innards</h1>
<h3>RJM Programming - August, 2025</h3>
<form onsubmit="setTimeout(checkitout,3000); return false;" method=GET data-target=myif action='./button_innards.html'>
<button onclick="document.getElementById('mysub').click();" id="binnards"><input onclick="event.stopPropagation();" type=datetime-local id=dtone value='' placeholder='Start datetime' name=dtend></input> <- Start Local Date Time End -> <input onclick="event.stopPropagation();" type=datetime-local id=dttwo value='' placeholder='End datetime' name=dttwo></input> <span style='padding: 3 3 3 3;background-color:lightgreen;border:2px solid green'> Seconds Elapsed </span> </button> <span id=resulting></span>
<input type=submit id=mysub style=display:none;></input>
<br><br><textarea style=display:none; name=bmkdata id=bmkdata value=""></textarea>
<br><br><br><input style=background-color:yellow;display:none; ontouchstart="ulli=true; document.title='' + document.title.trim(); utable=false; document.title='' + document.title.trim().replace(/^\*/g,''); " onmousedown="ulli=true; document.title='' + document.title.trim().replace(/^\*/g,''); utable=false;" onmouseover="ulli=true; document.title='' + document.title.trim().replace(/^\*/g,''); utable=false;" type=submit value="UL/LI" id=ulli name="ulli" disabled></input> <input style=background-color:orange;display:none; data-onclick="ulli=false; utable=true; document.title='*' + document.title.trim(); checkitout();" ontouchstart="ulli=false; utable=true; document.title='*' + document.title.trim();" onmousedown="ulli=false; utable=true; document.title='*' + document.title.trim(); " onmouseover="ulli=false; utable=true; document.title='*' + document.title.trim(); " type=submit value="Table" id=utable name="utable" disabled></input>
</form>
<iframe src='./button_innards.html' style=display:none; id=myif name=myif></iframe>
</body>
</html>