<html>
<head>
<title>Dictation on Google Chrome - RJM Programming - January, 2023</title>
<script type='text/javascript'>
var timeout=false;
var topwo=null;
var spsuff='', topsuff=' ';
var randis=-1, randi=-1, randsofar='', fullrandis='', moder='';
var notatend=false, clicked=false;
var prefix='', nothing='', cnotatend='', cnt=0, cah=false, curss=0;
var snapshots=[];
var smsn='';
var emaila='';
var onethousand=1000;
var silentpucnt=0;
var lgo=true;
var is__chrome=true;
var stopstatus=false;
var twlstarted=false;
var okay=true, okays=true;
var zhr=null, zform=null;
var myp=0;
//var isChromeWB = /Chrome/.test(navigator.userAgent) && /Google Inc/.test(navigator.vendor);
var isChromeWB = /Chrome/.test(navigator.userAgent) && /Google Inc/.test(navigator.vendor) && !/OPR/.test(navigator.userAgent);
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
if (navigator.userAgent.match('CriOS')) {
isChromeWB=true; //alert('' + isChromenm + ' ' + navigator.userAgent);
}
}

var sofar='';

if (document.URL.toLowerCase().indexOf('http:') == 0) {
randi=Math.floor(Math.random() * 198765432);
fullrandis='?rand=' + randi;
} else {
var isChromenm = /Chrome/.test(navigator.userAgent) && /Google Inc/.test(navigator.vendor) && !/OPR/.test(navigator.userAgent);
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
isChromenm=false;
if (navigator.userAgent.match('CriOS')) {
isChromenm=true; //alert('' + isChromenm + ' ' + navigator.userAgent);
}
}
if (!isChromenm) {
randi=Math.floor(Math.random() * 198765432);
fullrandis='?rand=' + randi;
}
}

function stateChanged() {
if (zhr.readyState == 4) {
if (zhr.status == 200) {
//document.title+='4 ' + zhr.response;
if (zhr.response.indexOf('no immediate delivery') != -1) {
document.getElementById('emailsms').click();
}
}
}
}

function ourprompt(ione, itwo) {
lgo=false;
var retval=window.prompt(ione, itwo);
lgo=true;
return retval;
}

function window_open(a1,a2,a3) {
if (topwo) {
topwo.close();
topwo=null;
}
return window.open(a1,a2,a3);
}

function anop() {
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
topwo=window_open('https://www.google.com/intl/en/chrome/demos/speech.html','_blank','top=120,left=' + eval(eval('' + screen.width) - 890) + ',width=890,height=680');
} else {
topwo=windowopen('https://www.rjmprogramming.com.au/PHP/speech_supervisor.php' + fullrandis,'_blank','top=120,left=' + eval(eval('' + screen.width) - 890) + ',width=890,height=680');
}
}

function is_ch() {
is__chrome=false;
}


function dictate() {
if (7 == 8) {
if (1 == 1) {
topwo=window.open('https://www.rjmprogramming.com.au/PHP/speech_supervisor.php', 'supgoeshere');
} else {
document.getElementById('supgoeshere').src='https://www.rjmprogramming.com.au/PHP/speech_supervisor.php';
}
document.getElementById('supgoeshere').style.display='block';
}
fri();
}

function checkdmc(iois) {
var newstuffis='', newrelps=[];
var ftdelim='';
var finaltranscript='';
var ijk=0;
if (iois != null) {
var aconto = (iois.contentWindow || iois.contentDocument);
if (aconto != null) {
if (aconto.document) { aconto = aconto.document; }
if (aconto.body != null) {
if (aconto.body.innerHTML != randsofar) {
if (randsofar != '') {
if (aconto.body.innerHTML.indexOf(randsofar) != -1) {
newstuffis=aconto.body.innerHTML.split(randsofar)[1];
}
}
randsofar=aconto.body.innerHTML;
console.log('storyboard=' + document.getElementById('storyboard').innerHTML + ' randis=' + randis + ' newstuff=' + newstuffis + ' acbih=' + aconto.body.innerHTML);
if (newstuffis == '') { newstuffis=randsofar; }
//if (document.getElementById('url').value.trim() == '' || (randis != -1 && newstuffis.replace(/\ style\=\\"display\:none\;\\"/g,'').indexOf('<p id=\"' + randis + '\">') != -1)) {
if ((randis != -1 && newstuffis.replace(/\ style\=\\"display\:none\;\\"/g,'').indexOf('<p id=\"' + randis + '\">') != -1)) {
console.log('Randis=' + randis + ' newstuff=' + newstuffis + ' acbih=' + aconto.body.innerHTML);
newrelps=newstuffis.replace(/\ style\=\\"display\:none\;\\"/g,'').split('<p id=\"' + randis + '\">');
console.log('newrelps=' + newrelps + ' Randis=' + randis + ' newstuff=' + newstuffis + ' acbih=' + aconto.body.innerHTML);
for (ijk=1; ijk<newrelps.length; ijk++) {
if (finaltranscript == '') {
finaltranscript=newrelps[ijk].split('</p>')[0];
} else {
finaltranscript+=' ' + newrelps[ijk].split('</p>')[0];
}
}

if (('' + document.getElementById('url').value.trim() + '~').indexOf((finaltranscript + '~')) == -1) {
if (document.getElementById('storyboard').innerHTML != '' && document.getElementById('storyboard').innerHTML == document.getElementById('storyboard').innerHTML.trim() && finaltranscript.substring(0,1) != ' ') {
ftdelim=' ';
}
console.log('PREhere with ' + finaltranscript);
document.getElementById('url').value=finaltranscript; //document.getElementById('storyboard').innerHTML=document.getElementById('storyboard').innerHTML + ftdelim + finaltranscript;
console.log('POSthere with ' + finaltranscript);
}
}
}
}
}
}
}

function topwolook() {
var ftdelim='';
var finaltranscript='';
twlstarted=true;
if (topwo) {
if (document.URL.toLowerCase().indexOf('http:') == 0 || !is__chrome) {
console.log('why?');
onethousand=3000;
if (!document.getElementById('ifdmcif')) {
document.getElementById('dmcif').innerHTML='<iframe id=ifdmcif onload=checkdmc(this); style=display:none; src=/PHP/spsup.htm?rnd=' + Math.floor(Math.random() * 1987654234) + '></iframe>';
} else {
document.getElementById('ifdmcif').src='/PHP/spsup.htm?rnd=' + Math.floor(Math.random() * 1987654234);
}
} else {
if (topwo) {
if (topwo.closed) { topwo=null; }
}
if (topwo) {
console.log(topwo.document.title);
var mon=topwo.document.getElementById('theblurbgoes');
//var sb=topwo.document.getElementById('start_button');
if (mon && typeof(mon) != 'undefined') { //topwo.document.getElementById('theblurbgoes')) {
//if (('' + topwo.document.getElementById('theblurbgoes').title) != '' && topwo.document.getElementById('theblurbgoes').value.trim() != '') {
if (topwo.document.getElementById('theblurbgoes').value.trim() != '') {
finaltranscript=topwo.document.getElementById('theblurbgoes').value;
topwo.document.getElementById('theblurbgoes').value=' ';
if (('' + document.getElementById('storyboard').innerHTML.trim() + '~').indexOf((finaltranscript + '~')) == -1) {
if (document.getElementById('storyboard').innerHTML != '' && document.getElementById('storyboard').innerHTML == document.getElementById('storyboard').innerHTML.trim() && finaltranscript.substring(0,1) != ' ') {
ftdelim=' ';
}
console.log('PRehere with ' + finaltranscript);
document.getElementById('posturl').value+=ftdelim + finaltranscript;
//pretextit(document.getElementById('url'));
document.getElementById('storyboard').innerHTML=document.getElementById('storyboard').innerHTML + ftdelim + finaltranscript;
console.log('POsthere with ' + finaltranscript);
//if (typeof(sb) != 'undefined') { topwo.document.getElementById('start_button').click(); }
}
//} else if (topwo.document.getElementById('theblurbgoes').value == ' ') {
//topwo.document.getElementById('theblurbgoes').value='';
//if (typeof(sb) != 'undefined') { topwo.document.getElementById('start_button').click(); }
}
}
}
}
}
setTimeout(topwolook,onethousand);
}

function fri() {
myp=10;
if (topwo) {
topwo.close();
topwo=null;
}
if (!stopstatus) {
if (!twlstarted) {
twlstarted=true; // new
setTimeout(topwolook,5000);
}
randis=randi;
if (lgo) {
setTimeout(beep, 3600);
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
topwo=window_open('https://www.google.com/intl/en/chrome/demos/speech.html','_blank','top=120,left=' + eval(eval('' + screen.width) - 890) + ',width=890,height=680');
} else {
topwo=window_open('https://www.rjmprogramming.com.au/PHP/speech_supervisor.php' + fullrandis,'_blank','top=120,left=' + eval(eval('' + screen.width) - 890) + ',width=890,height=680');
}
}
}
}

function extracte(inea, modeback) {
var atsare=inea.split('@');
if (modeback == 1) {
if (eval('' + atsare.length) > 2) {
return ' ' + inea.split(atsare[0] + '@' + atsare[1] + '@')[1];
} else {
return '';
}
} else {
if (eval('' + atsare.length) > 2) {
return atsare[0] + '@' + atsare[1].trim();
} else {
return inea.trim();
}
}
return inea;
}

function emailit(toe) {
//document.title='0';
if (document.getElementById('posturl').value.trim() != '' && toe.indexOf('@') != -1) {
//document.title+='1';
zhr=new XMLHttpRequest();
zform=new FormData();
zform.append('inline', '');
zform.append('waitforreturn', 'y');
//zform.append('from', 'info@rjmprogramming.com.au');
//document.title+=extracte(toe,0);
zform.append('to', extracte(toe,0));
zform.append('subject', 'Dictation ...' + extracte(toe,1));
zform.append('htmlis', '<html><body><textarea rows=30 cols=60 style=background-color:#f0f0f0;>' + document.getElementById('posturl').value + '</textarea></body></html>');
//document.title+='2';
zhr.onreadystatechange=stateChanged;
zhr.open('post', '//www.rjmprogramming.com.au/HTMLCSS/emailhtml.php', true);
zhr.send(zform);
//document.title+='3';
}
}

function andthen() {
timeout=false;
}

function pretextit(addthis) {
var addv=addthis.value;
if (!timeout && addthis.value.trim() != '') {
if (sofar != '' && addthis.value.trim().toLowerCase().indexOf('email') == 0) { addv=addv.replace('Email','').replace('email','').replace('EMAIL','').trim(); document.getElementById('bemail').click(); }
if (sofar != '' && addthis.value.trim().toLowerCase().replace('message','sms').indexOf('sms') == 0) { addv=addv.replace('message','sms').replace('Message','Sms').replace('MESSAGE','SMS').replace('Sms','').replace('sms','').replace('SMS','').trim(); document.getElementById('bsms').click(); }
if (addthis.value.trim().toLowerCase().indexOf('stop') == 0) { stopstatus=true; addv=addv.replace('Stop','').replace('stop','').replace('STOP','').trim(); }
if (addv.trim().toLowerCase().trim().indexOf('start') == 0) { if (stopstatus) { addv=addv.replace('Start','').replace('start','').replace('START','').trim(); } stopstatus=false; }
if (addv.trim() != '') {
sofar+=' ' + addv;
document.getElementById('dbutton').click();
}
timeout=true;
document.getElementById('posturl').value=sofar;
setTimeout(andthen, 1000);
} //else if (addv.trim() != '') {
//document.title=addv.trim();
//}
}

function textit(addthis) {
var addv=addthis.value;
if (sofar != '' && addthis.value.trim().toLowerCase().indexOf('email') == 0) { addv=addv.replace('Email','').replace('email','').replace('EMAIL','').trim(); document.getElementById('bemail').click(); }
if (sofar != '' && addthis.value.trim().toLowerCase().replace('message','sms').indexOf('sms') == 0) { addv=addv.replace('message','sms').replace('Message','Sms').replace('MESSAGE','SMS').replace('Sms','').replace('sms','').replace('SMS','').trim(); document.getElementById('bsms').click(); }
if (addthis.value.trim().toLowerCase().indexOf('stop') == 0) { stopstatus=true; addv=addv.replace('Stop','').replace('stop','').replace('STOP','').trim(); }
if (addv.trim().toLowerCase().trim().indexOf('start') == 0) { if (stopstatus) { addv=addv.replace('Start','').replace('start','').replace('START','').trim(); } stopstatus=false; }
if (addv.trim() != '') {
sofar+=' ' + addv;
document.getElementById('dbutton').click();
}
addthis.value=sofar;
}

function beep() { // thanks to https://stackoverflow.com/questions/879152/how-do-i-make-javascript-beep
var snd = new Audio("data:audio/wav;base64,//uQRAAAAWMSLwUIYAAsYkXgoQwAEaYLWfkWgAI0wWs/ItAAAGDgYtAgAyN+QWaAAihwMWm4G8QQRDiMcCBcH3Cc+CDv/7xA4Tvh9Rz/y8QADBwMWgQAZG/ILNAARQ4GLTcDeIIIhxGOBAuD7hOfBB3/94gcJ3w+o5/5eIAIAAAVwWgQAVQ2ORaIQwEMAJiDg95G4nQL7mQVWI6GwRcfsZAcsKkJvxgxEjzFUgfHoSQ9Qq7KNwqHwuB13MA4a1q/DmBrHgPcmjiGoh//EwC5nGPEmS4RcfkVKOhJf+WOgoxJclFz3kgn//dBA+ya1GhurNn8zb//9NNutNuhz31f////9vt///z+IdAEAAAK4LQIAKobHItEIYCGAExBwe8jcToF9zIKrEdDYIuP2MgOWFSE34wYiR5iqQPj0JIeoVdlG4VD4XA67mAcNa1fhzA1jwHuTRxDUQ//iYBczjHiTJcIuPyKlHQkv/LHQUYkuSi57yQT//uggfZNajQ3Vmz+Zt//+mm3Wm3Q576v////+32///5/EOgAAADVghQAAAAA//uQZAUAB1WI0PZugAAAAAoQwAAAEk3nRd2qAAAAACiDgAAAAAAABCqEEQRLCgwpBGMlJkIz8jKhGvj4k6jzRnqasNKIeoh5gI7BJaC1A1AoNBjJgbyApVS4IDlZgDU5WUAxEKDNmmALHzZp0Fkz1FMTmGFl1FMEyodIavcCAUHDWrKAIA4aa2oCgILEBupZgHvAhEBcZ6joQBxS76Agccr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Gid/9aaaZTGMuj9mpu9Mpio1dXrr5HERTZSmqU36A3CumzN/9Robv/Xx4v9ijkSRSNLQhAWumap82WRSBUqXStV/YcS+XVLnSS+WLDroqArFkMEsAS+eWmrUzrO0oEmE40RlMZ5+ODIkAyKAGUwZ3mVKmcamcJnMW26MRPgUw6j+LkhyHGVGYjSUUKNpuJUQoOIAyDvEyG8S5yfK6dhZc0Tx1KI/gviKL6qvvFs1+bWtaz58uUNnryq6kt5RzOCkPWlVqVX2a/EEBUdU1KrXLf40GoiiFXK///qpoiDXrOgqDR38JB0bw7SoL+ZB9o1RCkQjQ2CBYZKd/+VJxZRRZlqSkKiws0WFxUyCwsKiMy7hUVFhIaCrNQsKkTIsLivwKKigsj8XYlwt/WKi2N4d//uQRCSAAjURNIHpMZBGYiaQPSYyAAABLAAAAAAAACWAAAAApUF/Mg+0aohSIRobBAsMlO//Kk4soosy1JSFRYWaLC4qZBYWFRGZdwqKiwkNBVmoWFSJkWFxX4FFRQWR+LsS4W/rFRb/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////VEFHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAU291bmRib3kuZGUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMjAwNGh0dHA6Ly93d3cuc291bmRib3kuZGUAAAAAAAAAACU=");
snd.play();
}

function emailoff() {
if (document.getElementById('posturl').value.trim() != '') {
document.getElementById('emailsms').href='mailto:' + extracte(emaila, 0) + '?subject=Dictation%20...' + encodeURIComponent(extracte(emaila, 1)) + '&body=' + encodeURIComponent(document.getElementById('posturl').value);
if (emaila.indexOf('@') != -1 && document.URL.toLowerCase().indexOf('rjmprogramming.com.au/') != -1 && extracte(emaila,0) == extracte(emaila,0).toUpperCase()) {
emailit(emaila);
} else {
document.getElementById('emailsms').click();
}
}
}

function premaybesmsn() {
if (!okays) { okays=true; maybesmsn(' '); }
}

function premaybeemaila() {
if (!okay) { okay=true; maybeemaila(' '); }
}

function omo() {
okay=true;
}

function omos() {
okays=true;
}

function maybesmsn(inif) {
if ((inif + '') != '') { smsn=''; } else if (inif == '' && smsn != '') { okays=false; setTimeout(premaybesmsn, 8000); return smsn; }
if (smsn == '' || inif == ' ') {
smsn=ourprompt('Please enter SMS number. Append space(s) to remember for next time.', smsn);
if (smsn == null) { smsn=''; }
if (smsn != '') { document.getElementById('bsms').title='Long hover to reset ' + smsn; }
if (smsn != smsn.trim() && smsn != '') {
smsn=smsn.trim();
document.getElementById('bsms').title='Long hover to reset ' + smsn;
if (('' + window.localStorage.getItem('dictation_sms')).replace(/^null$/g,'').replace(/^undefined$/g,'') != '') {
window.localStorage.removeItem('dictation_sms', smsn);
}
window.localStorage.setItem('dictation_sms', smsn);
} else if (('' + window.localStorage.getItem('dictation_sms')).replace(/^null$/g,'').replace(/^undefined$/g,'') != '') {
window.localStorage.removeItem('dictation_sms', smsn);
}
}
return smsn;
}

function maybeemaila(inif) {
if ((inif + '') != '') { emaila=''; } else if (inif == '' && emaila.indexOf('@') != -1) { okay=false; setTimeout(premaybeemaila, 8000); return emaila; }
if (emaila == '' || inif == ' ') {
emaila=ourprompt('Please enter Email address, an all uppercase one using PHP mail rather than mailto "a" link. A second @ delimiter can separate an appendage to the default subject line of "Dictation ..." for your emails. Append space(s) to remember for next time.', emaila);
if (emaila == null) { emaila=''; }
if (emaila.indexOf('@') != -1) { document.getElementById('bemail').title='Long hover to reset ' + emaila; }
if (emaila != emaila.trim() && emaila.indexOf('@') != -1) {
emaila=emaila.trim();
if (('' + window.localStorage.getItem('dictation_email')).replace(/^null$/g,'').replace(/^undefined$/g,'').indexOf('@') != -1) {
window.localStorage.removeItem('dictation_email', emaila);
}
window.localStorage.setItem('dictation_email', emaila);
} else if (('' + window.localStorage.getItem('dictation_email')).replace(/^null$/g,'').replace(/^undefined$/g,'').indexOf('@') != -1) {
window.localStorage.removeItem('dictation_email', emaila);
}
}
return emaila;
}

function smsoff() {
if (document.getElementById('posturl').value.trim() != '') {
document.getElementById('emailsms').href='sms:' + (smsn == '' ? maybesms(' ') : smsn) + '&body=' + encodeURIComponent(document.getElementById('posturl').value);
//if (smsn == '' && document.getElementById('emailsms').href.indexOf('sms:&') == -1) { smsn=document.getElementById('emailsms').href.split('sms:')[1].split('&')[0].split('?')[0]; }
document.getElementById('emailsms').click();
}
}

function mypf() {
if (!isChromeWB) { document.getElementById('myh4').innerHTML='Sorry, but Speech to Text does not work with your setup.'; }
if (myp == 0) {
if (('' + window.localStorage.getItem('dictation_email')).replace(/^null$/g,'').replace(/^undefined$/g,'').indexOf('@') != -1) {
emaila=('' + window.localStorage.getItem('dictation_email'));
document.getElementById('bemail').title+=' ' + emaila;
}
if (('' + window.localStorage.getItem('dictation_sms')).replace(/^null$/g,'').replace(/^undefined$/g,'') != '') {
smsn=('' + window.localStorage.getItem('dictation_sms'));
document.getElementById('bsms').title+=' ' + smsn;
}
}
myp++;
document.getElementById('myprogress').value='' + myp;
if (eval('' + myp) < 10) {
setTimeout(mypf, 1000);
} else {
document.getElementById('myprogress').style.display='none';
if (window.self == window.parent) { if (1 == 1) { document.getElementById('dbutton').innerHTML+=' ... perhaps at the beep. Stop to stop.'; document.getElementById('dbutton').click(); } else { fri(); } }
}
}

function checkpu() {
if (document.getElementById('posturl').value.trim() != '') {
document.getElementById('bemail').style.display='inline-block';
document.getElementById('bsms').style.display='inline-block';
}
if (document.getElementById('posturl').value != sofar) {
sofar=document.getElementById('posturl').value;
if (isChromeWB) { document.getElementById('dbutton').click(); }
if (sofar != sofar.replace(/\ Message$/g,'')) { sofar=sofar.replace(/\ Message$/g,''); document.getElementById('posturl').value=sofar; document.getElementById('bsms').click(); }
if (sofar != sofar.replace(/\ SMS$/g,'')) { sofar=sofar.replace(/\ SMS$/g,''); document.getElementById('posturl').value=sofar; document.getElementById('bsms').click(); }
if (sofar != sofar.replace(/\ Email$/g,'')) { sofar=sofar.replace(/\ Email$/g,''); document.getElementById('posturl').value=sofar; document.getElementById('bemail').click(); }
silentpucnt=0;
} else {
silentpucnt++;
}
if (eval('' + silentpucnt) >= 60) {
if (isChromeWB) { if (window.self == window.parent) { document.getElementById('dbutton').click(); } }
silentpucnt=0;
}
}

addEventListener('beforeunload', (event) => {

if (topwo) { topwo.close(); }

});

setInterval(checkpu, 1000);

</script>
</head>
<body onload=setTimeout(mypf,1000);>
<h1 id=myh1>Dictation on Google Chrome</h1>
<h3>RJM Programming - January, 2023</h3>
<h4 id=myh4></h4>

<table><tr><td style=vertical-align:top;>
<button id=dbutton name=dbutton onclick=dictate(); style=background-color:yellow;display:inline-block;>Dictate <progress id=myprogress value=0 min=0 max=10></progress> Again ... Below</button> <button onclick=emailoff(); id=bemail name=bemail style=display:inline-block;background-color:orange; onmouseout=omo(); onmouseover="maybeemaila('');" title='Long hover to reset'>Email</button> <button onclick=smsoff(); id=bsms name=bsms style=display:inline-block;background-color:orange; onmouseout=omos(); onmouseover="maybesmsn('');" title='Long hover to reset'>SMS</button><br>
<textarea data-onchange=textit(this); id=posturl name=posturl rows=30 cols=60 style=background-color:#f0f0f0;></textarea>
</td><td style=vertical-align:top;>
<iframe name=supgoeshere id=supgoeshere style=display:none;width:800px;height:900px; src=></iframe>
</td></tr></table>
<div id='dmcif' style=display:none;><iframe id='ifdmcif' onload=checkdmc(this); style=display:none; src='/PHP/spsup.htm?rnd=12345678945'></iframe></div>
<div contenteditable=true id=storyboard style=display:none;>Once upon a time</div>
<input type=text style=display:none; onchange=pretextit(this); id=url name=url value=''></input>
<a target=_top id=emailsms href='' style=display:none;>Email/SMS</a>
</body>
</html>