<!DOCTYPE html>
<html lang="en">
<head>
<title>Keyboard Typing Testing - RJM Programming - March, 2023</title>
<head>
<meta charset='UTF-8'/>
<script type=text/javascript>

var wpm=0.0;
var cpm=0.0;
var accuracy=0.0;
var retakes=0.0;
var wo=null;
var wogt=null;
var lastinwordo=null;
var mymem=false;

var numwords=-1;
var numsecs=0;
var numchars=0;
var numkds=0;
var numkps=0;
var rowcnt=20;
var btn='';
var swidth=(location.search.split('swidth=')[1] ? decodeURIComponent(location.search.split('swidth=')[1].split('&')[0]).replace('px','') : '-1');
var olang=(location.search.split('lang=')[1] ? decodeURIComponent(location.search.split('lang=')[1].split('&')[0]) : '');

var vswords=0;
var vschars=0;
var cnamelist=location.search.split('namelist=')[1] ? decodeURIComponent(location.search.split('namelist=')[1].split('&')[0]) : '';
var cwordlist=location.search.split('wordlist=')[1] ? decodeURIComponent(location.search.split('wordlist=')[1].split('&')[0]) : '';
var cphraselist=location.search.split('phraselist=')[1] ? decodeURIComponent(location.search.split('phraselist=')[1].split('&')[0]) : '';

// Thanks to https://stackoverflow.com/questions/1226574/disable-pasting-text-into-html-form

// Register onpaste on inputs and textareas in browsers that don't
// natively support it.
(function () {
var onload = window.onload;

window.onload = function () {
if (typeof onload == "function") {
onload.apply(this, arguments);
}

var fields = [];
var inputs = document.getElementsByTagName("input");
var textareas = document.getElementsByTagName("textarea");

for (var i = 0; i < inputs.length; i++) {
fields.push(inputs[i]);
}

for (var i = 0; i < textareas.length; i++) {
fields.push(textareas[i]);
}

for (var i = 0; i < fields.length; i++) {
var field = fields[i];

if (typeof field.onpaste != "function" && !!field.getAttribute("onpaste")) {
field.onpaste = eval("(function () { " + field.getAttribute("onpaste") + " })");
}

if (typeof field.onpaste == "function") {
var oninput = field.oninput;

field.oninput = function () {
if (typeof oninput == "function") {
oninput.apply(this, arguments);
}

if (typeof this.previousValue == "undefined") {
this.previousValue = this.value;
}

var pasted = (Math.abs(this.previousValue.length - this.value.length) > 1 && this.value != "");

if (pasted && !this.onpaste.apply(this, arguments)) {
this.value = this.previousValue;
}

this.previousValue = this.value;
};

if (field.addEventListener) {
field.addEventListener("input", field.oninput, false);
} else if (field.attachEvent) {
field.attachEvent("oninput", field.oninput);
}
}
}
}
})();

function maybeokay(ing) {
if (eval('' + ing.length) > 1) {
var fl=ing.substring(0,1);
var el=ing.slice(-1);
if (fl != el) {
if ((fl < '0' || fl > 'z') && ing.substring(1).indexOf(fl) != -1) {
return '"' + ing.substring(1).split(fl)[0] + '"';
}
} else {
if ((fl < '0' || fl > 'z')) {
return '"' + ing.substring(1).split(fl)[0] + '"';
}
}
}
return ing;
}

function maybeok(ing) {
if (eval('' + ing.length) > 1 && document.getElementById('myif').src.indexOf('added') != -1) {
var fl=ing.substring(0,1);
var el=ing.slice(-1);
if (fl == el) {
if (fl < '0' || fl > 'z') {
return 'x';
}
}
}
return ing;
}

function noneagain() {
var ideaone='';
document.getElementById('oops').style.display='none';
if (document.getElementById('results').innerHTML != '' && numwords < 0) {
if (document.getElementById('results').innerText.indexOf(' ... ') != -1) {
ideaone=maybeokay(document.getElementById('results').innerText.split(' ... ')[1].replace(/\<br\>/g, String.fromCharCode(10)).replace(/“/g,String.fromCharCode(34)).replace('“', '"').replace('“', '"').replace('“', '"').replace('“', '"').replace('“', '"').replace('“', '"').replace('“', '"').replace('“', '"').trim());
if ((maybeok(ideaone) + ' ').substring(0,1) != '"' && document.getElementById('myif').src.indexOf('added') != -1) {
//alert('ideaone=' + ideaone);
document.getElementById('results').innerHTML='';
document.getElementById('myif').src=document.getElementById('myif').src.replace('added', 'created');
return '';
} else {
//alert('IdeaOnE=' + ideaone);
document.getElementById('yourta').value=ideaone;
}
} else {
ideaone=maybeokay(document.getElementById('results').innerText.replace(/\<br\>/g, String.fromCharCode(10)).replace(/“/g,String.fromCharCode(34)).replace('“', '"').replace('“', '"').replace('“', '"').replace('“', '"').replace('“', '"').replace('“', '"').replace('“', '"').replace('“', '"').trim());
if ((maybeok(ideaone) + ' ').substring(0,1) != '"' && document.getElementById('myif').src.indexOf('added') != -1) {
//alert('Ideaone=' + ideaone);
document.getElementById('results').innerHTML='';
document.getElementById('myif').src=document.getElementById('myif').src.replace('added', 'created');
return '';
} else {
//alert('IdeaONE=' + ideaone);
document.getElementById('yourta').value=ideaone;
}
}
numwords=document.getElementById('yourta').value.split(' ').length;
document.getElementById('yourta').style.cursor='pointer';
document.body.style.cursor='pointer';
}
}

function nsgo() {
if (numkds < 0) {
numkds=-numkds;
} else {
setTimeout(nsgo, 1000);
numsecs++;
}
}

function show() {
numkds=-numkds;
var yt=document.getElementById('yourta').value;
var mt=document.getElementById('myta').value;
var yts=yt.split(']"');
var mts=mt.split('"');
if (yts.length > 1) {
if (mts.length <= 3) {
if (mts.indexOf('"') == 0) {
if (yt.indexOf(mt.substring(0,6)) != -1) {
yt=mt.substring(0,6) + yt.split(mt.substring(0,6))[1].split('"')[0] + '"';
} else if (yt.indexOf(mt.substring(0,5)) != -1) {
yt=mt.substring(0,5) + yt.split(mt.substring(0,5))[1].split('"')[0] + '"';
} else if (yt.indexOf(mt.substring(0,4)) != -1) {
yt=mt.substring(0,4) + yt.split(mt.substring(0,4))[1].split('"')[0] + '"';
} else if (yt.indexOf(mt.substring(0,3)) != -1) {
yt=mt.substring(0,3) + yt.split(mt.substring(0,3))[1].split('"')[0] + '"';
} else if (yt.indexOf(mt.substring(0,2)) != -1) {
yt=mt.substring(0,2) + yt.split(mt.substring(0,2))[1].split('"')[0] + '"';
}
}
}
}
//alert('word count=' + document.getElementById('myta').value.split(' ').length + ' and character count=' + document.getElementById('myta').value.split('').length);
document.getElementById('wpm').value='' + parseFloat(eval(eval('' + document.getElementById('myta').value.split(' ').length) / eval(numsecs / 60.0)).toPrecision(1)) + ' words/minute';
document.getElementById('cpm').value='' + parseFloat(eval(eval('' + document.getElementById('myta').value.split('').length) / eval(numsecs / 60.0)).toPrecision(1)) + ' characters/minute';
if (document.getElementById('myta').value == yt) {
document.getElementById('accuracy').value='100.0% accuracy';
} else {
var ourcchars=0;
for (var ii=0; ii<yt.length; ii++) {
if (ii < document.getElementById('myta').value.length) {
if (document.getElementById('myta').value.substring(ii).substring(0,1) == yt.substring(ii).substring(0,1)) {
ourcchars++;
}
}
}
document.getElementById('accuracy').value='' + parseFloat(eval(eval('' + ourcchars) * 100.0 / yt.length).toPrecision(3)) + '% accuracy';
}
if (Math.abs(numkds) == numkps) {
document.getElementById('retakes').value='0.0% retakes';
} else {
document.getElementById('retakes').value='' + parseFloat(eval(eval(Math.abs(numkds) - numkps) * 100.0 / numkps).toPrecision(1)) + '% retakes';
}
document.getElementById('rbut').style.display='inline-block';
}

function resetit() {
document.getElementById('myta').value='';
wpm=0.0;
cpm=0.0;
accuracy=0.0;
retakes=0.0;

numwords=-1;
numsecs=0;
numchars=0;
numkds=0;
numkps=0;

vswords=0;
vschars=0;
document.getElementById('wpm').value='';
document.getElementById('cpm').value='';
document.getElementById('accuracy').value='';
document.getElementById('retakes').value='';
document.getElementById('rbut').style.display='none';
document.getElementById('myta').focus();
}

function huhcols() {
if (1 == 2) {
document.getElementById('myta').cols='' + Math.floor(eval('' + screen.width) * 66.0 / 1440.0);
document.getElementById('yourta').cols='' + Math.floor(eval('' + screen.width) * 66.0 / 1440.0);
}
if (document.URL.indexOf('variety=') != -1) {
document.getElementById('myspan').style.display='inline-block';
}
}

function selit(osel) {
if (osel.value == 'random') {
document.getElementById('yourdiv').style.display='none';
document.getElementById('yourta').style.visibility='visible';
if (1 == 1) { location.href=document.URL.split('?')[0].split('#')[0] + '?variety=random'; }
if (document.getElementById('results').innerHTML != '') {
resetit();
}
document.getElementById('myif').src='./remote_files.php?url=http%3A%2F%2Frandomthingstodo.com%2Fthoughts&type=+class%3D%22card-text%22&ord=2&starting=&middling=&containing=';
} else if (osel.value == 'headline') {
document.getElementById('yourdiv').style.display='none';
document.getElementById('yourta').style.visibility='visible';
if (1 == 1) { location.href=document.URL.split('?')[0].split('#')[0] + '?variety=headline'; }
if (document.getElementById('results').innerHTML != '') {
resetit();
}
document.getElementById('myif').src='./remote_files.php?url=http%3A%2F%2Fnewsapi.org%2Fv2%2Feverything%3Fq%3Dpolitics%26from%3Ddateymd%26sortBy%3DpublishedAt%26apiKey%3Df0a62125e2df4442be7c5ec500eebbfd&type=+class%3D%22content%22&ord=1&starting=&middling=&containing=';
} else if (osel.value == 'names') {
if (1 == 1) { location.href=document.URL.split('?')[0].split('#')[0] + '?variety=names&namelist=' + encodeURIComponent(cnamelist); }
} else if (osel.value == 'WORDS') {
if (1 == 1) {
olang='';
document.getElementById('language').style.display='inline-block';
setTimeout(langlook, 1000);
} else {
var xl=prompt('Please enter Language Code to offer translation links to.', '');
if (xl == null) { xl=''; }
if (1 == 1) { location.href=document.URL.split('?')[0].split('#')[0] + '?variety=words&wordlist=' + encodeURIComponent(cwordlist) + '&lang=' + xl; }
}
} else if (osel.value == 'words') {
if (1 == 1) { location.href=document.URL.split('?')[0].split('#')[0] + '?variety=words&wordlist=' + encodeURIComponent(cwordlist); }
} else if (osel.value == 'PHRASES') {
olang='';
document.getElementById('language').style.display='inline-block';
setTimeout(langlook, 1000);
} else if (osel.value == 'phrases') {
document.getElementById('yourdiv').style.display='none';
document.getElementById('yourta').style.visibility='visible';
if (1 == 1) { location.href=document.URL.split('?')[0].split('#')[0] + '?variety=phrases&phraselist=' + encodeURIComponent(cphraselist); }
} else {
document.getElementById('yourdiv').style.display='none';
document.getElementById('yourta').style.visibility='visible';
if (document.getElementById('results').innerHTML != '') {
resetit();
}
document.getElementById('myif').src='./remote_files.php?url=http%3A%2F%2Fwww.goodreads.com%2Fquotes%2Frecently_added&type=+class%3D"quoteText"&ord=3&starting=&middling=&containing=';
}

}

function langlook() {
if (olang != '') {
if (document.getElementById('mode').value.toLowerCase().indexOf('word') == 0) {
if (1 == 1) { location.href=document.URL.split('?')[0].split('#')[0] + '?variety=words&wordlist=' + encodeURIComponent(cwordlist) + '&lang=' + olang; }
} else if (document.getElementById('mode').value.toLowerCase().indexOf('phrase') == 0) {
if (1 == 1) { location.href=document.URL.split('?')[0].split('#')[0] + '?variety=phrases&phraselist=' + encodeURIComponent(cphraselist) + '&lang=' + olang; }
}
} else {
setTimeout(langlook, 1000);
}
}

function namepush(iois) {
if (iois != null) {
aconto = (iois.contentWindow || iois.contentDocument);
if (aconto != null) {
if (aconto.document) { aconto = aconto.document; }
if (aconto.body != null) {
if (cnamelist == '') {
cnamelist=aconto.body.innerHTML;
} else {
cnamelist+=String.fromCharCode(10) + aconto.body.innerHTML;
}
//document.title=cnamelist;
if (numwords < 0 && cnamelist.length < 400) {
document.getElementById('myifname').src=document.getElementById('myifname').src.split('&rand')[0] + '&rand=' + Math.floor(Math.random() * 19876754);
}
}
}
}
}

function wordpush(iois) {
if (iois != null) {
aconto = (iois.contentWindow || iois.contentDocument);
if (aconto != null) {
if (aconto.document) { aconto = aconto.document; }
if (aconto.body != null) {
if (cwordlist == '') {
cwordlist=aconto.body.innerHTML;
} else {
cwordlist+=String.fromCharCode(10) + aconto.body.innerHTML;
}
//document.title=cnamelist;
if (numwords < 0 && cwordlist.length < 400) {
document.getElementById('myifword').src=document.getElementById('myifword').src.split('&rand')[0] + '&rand=' + Math.floor(Math.random() * 19876754);
}
}
}
}
}

function phrasepush(iois) {
if (iois != null) {
aconto = (iois.contentWindow || iois.contentDocument);
if (aconto != null) {
if (aconto.document) { aconto = aconto.document; }
if (aconto.body != null) {
if (cphraselist == '') {
cphraselist=aconto.body.innerHTML;
} else {
cphraselist+=String.fromCharCode(10) + aconto.body.innerHTML;
}
//document.title=cnamelist;
if (numwords < 0 && cphraselist.length < 700) {
document.getElementById('myifphrase').src=document.getElementById('myifphrase').src.split('&rand')[0] + '&rand=' + Math.floor(Math.random() * 19876754);
}
}
}
}
}

function rerow() {
console.log('here with rowcnt=' + rowcnt);
if (eval('' + rowcnt) > 20) {
document.getElementById('yourta').rows='' + rowcnt;
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
document.getElementById('yourta').style.textAlign='right';
}
document.getElementById('myta').rows='' + rowcnt;
setTimeout(copyTextareaStyling, 1000);
console.log('Here with rowcnt=' + rowcnt);
}
}


function copyTextareaStyling() {
if (cphraselist != '' && document.URL.indexOf('variety=phrases') != -1 && olang != '') {
olang=olang;
} else {
if (btn == '' || (cnamelist == '' && cwordlist == '')) { return ''; }
}
//alert(98);
var output = document.getElementById("yourta"), divelem = document.getElementById("yourdiv");
var recto = output.getBoundingClientRect();
if (eval('' + swidth) < 0) { swidth=eval('' + recto.width); }
//alert(swidth);
if (divelem) { // thanks to ideas off http://stackoverflow.com/questions/12266320/copy-div-content-to-textarea-or-text-with-the-same-font-family-style
divelem.style.fontFamily = window.getComputedStyle(output,null).fontFamily || output.style.fontFamily || output.currentStyle.getCurrentProperty('font-family');
divelem.style.fontSize = window.getComputedStyle(output,null).fontSize || output.style.fontSize || output.currentStyle.getCurrentProperty('font-size');
divelem.style.border = window.getComputedStyle(output,null).border || output.style.border || output.currentStyle.getCurrentProperty('border');
divelem.style.padding = window.getComputedStyle(output,null).padding || output.style.padding || output.currentStyle.getCurrentProperty('padding');
divelem.style.margin = window.getComputedStyle(output,null).margin || output.style.margin || output.currentStyle.getCurrentProperty('margin');
divelem.style.overflow = window.getComputedStyle(output,null).overflow || output.style.overflow || output.currentStyle.getCurrentProperty('overflow');
}
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
divelem.style.textAlign='right';
}
divelem.style.zIndex='67';
divelem.style.position='absolute';
divelem.style.top='' + recto.top + 'px';
divelem.style.left='' + recto.left + 'px';
divelem.style.width='' + eval(-10 + eval('' + recto.width)) + 'px';
divelem.style.height='' + eval(1 + eval('' + recto.height)) + 'px';
divelem.style.backgroundColor='rgba(50,255,255,0.5)';
var tlines=output.value.split(String.fromCharCode(10));
var wgt='';
for (var itl=0; itl<tlines.length; itl++) {
if (olang != '') { wgt=' ondblclick=" wogtit(' + "'" + tlines[itl] + "'" + ') " '; }
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
divelem.innerHTML+='<a' + wgt + ' onclick="if (olang != ' + "''" + ') { iflang(this); }" style="text-decoration-style:dotted;text-decoration-thickness:1px;" target=_blank title="Thanks to thefreedictionary.com and behindthename.com" href="' + btn + tlines[itl] + '">' + tlines[itl] + '</a><br>';
} else {
divelem.innerHTML+='<a' + wgt + ' style="text-decoration:underline;text-decoration-style:dotted;text-decoration-thickness:1px;cursor:pointer;" target=_blank onclick="if (olang != ' + "''" + ') { iflang(this); } if (wo) { if (!wo.closed) { wo.close(); } wo=null; } wo=window.open(btn + encodeURIComponent(this.innerHTML),' + "'_blank','top=100,left=" + eval(-600 + eval('' + screen.width)) + ",width=600,height=600'" + ');" data-title="Thanks to thefreedictionary.com and behindthename.com" title="' + btn + tlines[itl] + '" data-href="' + btn + tlines[itl] + '">' + tlines[itl] + '</a><br>';
}
}
output.style.color='transparent';
divelem.style.display='block';
setTimeout(osvh, 30000); //output.style.visibility='hidden';
return '';
}

function iflang(inwordo) {
var inword=inwordo.innerHTML;
var onec=(inword + 'A').substring(0,1);
var irl=0;
if ((inword + ' ').indexOf('"') == 0) {
if ((' ' + inword).slice(-1).indexOf('"') == 0) {
irl=eval(-2 + eval('' + document.getElementById('results').innerHTML.length));
inword=inword.substring(1, eval(1 + irl));
//alert('inWord=' + inword);
} //else {
//alert('huh');
//}
} else if (onec < '0' || onec > 'z') {
if ((' ' + inword).slice(-1).indexOf(onec) == 0) {
irl=eval(-2 + eval('' + document.getElementById('results').innerHTML.length));
inword=inword.substring(1, eval(1 + irl));
//alert('Inword=' + inword);
} //else {
//alert('Huh');
//}
}
//alert('inword=' + inword);
document.getElementById('results').innerHTML='';
document.getElementById('sresults').innerHTML='';
mymem=true;
document.getElementById('myt').src='//www.rjmprogramming.com.au/remote_files.php?url=https%3A%2F%2Fapi.mymemory.translated.net%2Fget%3Fq%3D' + encodeURIComponent(inword) + '%26langpair%3Den%7C' + olang + '&type=+class%3D%22translatedText%22&ord=2&starting=&middling=&containing=';
lastinwordo=inwordo;
}

function preresize() {
resizeta(document.getElementById("yourta"));
}

function resizeta(tao) {
var rectth = document.getElementById("lhs").getBoundingClientRect();
var recttd = document.getElementById("lhstd").getBoundingClientRect();
var rectta = document.getElementById("yourta").getBoundingClientRect();
var rectdiv = document.getElementById("yourdiv").getBoundingClientRect();
if (eval('' + swidth) < 0) { swidth=eval('' + rectta.width); }
console.log('Swidth=' + swidth + ' and rectta.width=' + rectta.width);
if (eval('' + rectta.width) < eval('' + swidth) || eval('' + rectta.width) > eval('' + swidth)) {
if (eval('' + swidth) > 0 && Math.abs(eval('' + rectta.width) - eval('' + swidth)) > 10) {
var lessw=eval(eval('' + swidth) - eval('' + rectta.width));
location.href=document.URL.split('#')[0].split('&swidth=')[0] + '&swidth=' + eval(swidth - lessw) + 'px';
console.log('lessw=' + lessw + ' and swidth=' + swidth);
document.getElementById("lhs").style.width='' + eval(eval('' + rectth.width) - eval('' + lessw)) + 'px';
document.getElementById("lhstd").style.width='' + eval(eval('' + recttd.width) - eval('' + lessw)) + 'px';
console.log('lhs=' + eval(eval('' + recttd.width) - eval('' + lessw)));
document.getElementById("yourdiv").style.width='' + eval(eval('' + rectdiv.width) - eval('' + lessw)) + 'px';
console.log('divw=' + eval(eval('' + rectdiv.width) - eval('' + lessw)));
swidth-=lessw;
console.log('swidth=' + swidth);
document.getElementById("sone").innerHTML='<br>';
document.getElementById("stwo").innerHTML='<br>';
document.getElementById("sthree").innerHTML='<br>';
document.getElementById("sfour").innerHTML='<br>';
document.getElementById("yourta").style.visibility='hidden';
document.getElementById("lhs").style.textAlign='left';
//var rectrta = document.getElementById("myta").getBoundingClientRect();
//document.getElementById("yourta").style.top='' + rectrta.top + 'px';
//document.getElementById("yourdiv").style.top='' + rectrta.top + 'px';
copyTextareaStyling();
}
}
}

function osvh() {
document.getElementById("yourta").style.visibility='hidden';
}

function resultscheck() {
var irl=0;
// "porter pr\u00e9judice"
if (!mymem) { return ''; }
var onec=(document.getElementById('results').innerHTML + 'A').substring(0,1);
if (document.getElementById('results').innerHTML.indexOf('<br>') != -1) {
document.getElementById('results').innerHTML=document.getElementById('results').innerHTML.replace(/\<br\>/g, '');
}
if ((document.getElementById('results').innerHTML + ' ').indexOf('"') == 0) {
if ((' ' + document.getElementById('results').innerHTML).slice(-1).indexOf('"') != -1) {
irl=eval(-2 + eval('' + document.getElementById('results').innerHTML.length));
document.getElementById('results').innerHTML=document.getElementById('results').innerHTML.substring(1, eval(1 + irl));
//alert('reSults=' + document.getElementById('results').innerHTML);
} //else {
//alert('Huh');
//}
} else if (onec < '0' || onec > 'z') {
if ((' ' + document.getElementById('results').innerHTML).slice(-1).indexOf(onec) != -1) {
//document.getElementById('results').innerHTML=document.getElementById('results').innerHTML.substring(1, eval(-2 + eval('' + document.getElementById('results').innerHTML.length)));
document.getElementById('results').innerHTML=document.getElementById('results').innerHTML.replace(onec,'').replace(onec,'');
//alert('Results=' + document.getElementById('results').innerHTML);
} //else {
//alert('HUH');
//}
}
if (document.getElementById('results').innerHTML == 'null') { lastinwordo.style.color='darkgreen'; document.getElementById('results').innerHTML=''; if (wogt) { if (!wogt.closed) { wogt.close(); } wogt=null; } wogt=window.open('//translate.google.com/?sl=auto&tl=' + olang + '&text=' + encodeURIComponent(lastinwordo.innerHTML) + '&op=translate', '_blank', 'top=150,left=' + eval(-600 + eval('' + screen.width)) + ',width=600,height=600'); }
//if (document.getElementById('results').innerHTML != '') { alert('results=' + document.getElementById('results').innerHTML); }
if (document.getElementById('results').innerHTML.indexOf("\\".substring(0,1) + "u") != -1) {
var uwords=[], uuword='';
uwords=document.getElementById('results').innerHTML.split("\\".substring(0,1) + "u");
uuword=uwords[0];
console.log('results ih=' + document.getElementById('results').innerHTML + ' and uwords length=' + uwords.length);
for (var iu=1; iu<uwords.length; iu++) {
if (eval('' + uwords[iu].length) > 4) {
uuword+='&#x' + uwords[iu].substring(0,4) + ';' + uwords[iu].substring(4);
} else {
uuword+='&#x' + uwords[iu].substring(0,4) + ';';
}
console.log('iu=' + iu + ' and uuword=' + uuword);
}
//document.getElementById('results').innerHTML='&#x' + document.getElementById('results').innerHTML.substring(2).replace(/\\u/g, ';&#x') + ';';
document.getElementById('results').innerHTML=uuword;
document.getElementById('sresults').innerHTML='<a onclick=wogtit("' + lastinwordo.innerHTML + '"); style=text-decoration:none;cursor:pointer;>' + uuword + '</a>';
}
if (lastinwordo != null && document.getElementById('results').innerHTML != '') {
lastinwordo.title=document.getElementById('results').innerHTML;
lastinwordo.style.color='magenta';
mymem=false;
document.getElementById('results').innerHTML='';
}
}

function wogtit(inw) {
if (wogt) { if (!wogt.closed) { wogt.close(); } wogt=null; } wogt=window.open('//translate.google.com/?sl=auto&tl=' + olang + '&text=' + encodeURIComponent(inw) + '&op=translate', '_blank', 'top=150,left=' + eval(-600 + eval('' + screen.width)) + ',width=600,height=600');
}

function better(incd) {
if (document.getElementById('language').innerHTML.indexOf('"' + incd + '">') != -1) {
//document.getElementById('results').title='Translations to ' + document.getElementById('language').innerHTML.split('"' + incd + '">')[1].split('<')[0] + ' appear here.';
document.getElementById('sresults').title='Translations to ' + document.getElementById('language').innerHTML.split('"' + incd + '">')[1].split('<')[0] + ' appear here thanks to My Memory or onward click to Google Translate.';
return document.getElementById('language').innerHTML.split('"' + incd + '">')[1].split('<')[0];
}
return incd;
}

if (cnamelist == '' && cwordlist == '' && cphraselist == '') {
setInterval(noneagain, 5000);
} else if (cnamelist != '' || cwordlist != '') {
setInterval(preresize, 8000);
}

setInterval(resultscheck, 1000);
</script>
</head>
<body onresize="copyTextareaStyling();" style=cursor:progress; onload="if (olang != '') { if (cphraselist != '' && document.URL.indexOf('variety=phrases') != -1) { document.getElementById('poit').innerHTML+=' with ' + better(olang) + ' translation links'; } else { document.getElementById('oit').innerHTML+=' with ' + better(olang) + ' translation links'; } } if (document.URL.indexOf('variety=names') == -1 && document.URL.indexOf('variety=words') == -1 && document.URL.indexOf('variety=phrases') == -1) { cnamelist=cnamelist; } else if (document.URL.indexOf('variety=names') != -1 && cnamelist != '') { btn='//www.behindthename.com/name/'; rowcnt=eval('' + cnamelist.split(String.fromCharCode(10)).length); document.getElementById('yourta').value=cnamelist; setTimeout(rerow, 3000); } else if (document.URL.indexOf('variety=phrases') != -1 && cphraselist != '') { if (olang != '') { btn='//www.thefreedictionary.com/'; btn='//translate.google.com/?sl=auto&tl=' + olang + '&op=translate&text='; } rowcnt=eval('' + cphraselist.split(String.fromCharCode(10)).length); document.getElementById('yourta').value=cphraselist; setTimeout(rerow, 3000); } else if (document.URL.indexOf('variety=words') != -1 && cwordlist != '') { btn='//www.thefreedictionary.com/'; rowcnt=eval('' + cwordlist.split(String.fromCharCode(10)).length); document.getElementById('yourta').value=cwordlist; setTimeout(rerow, 3000); } huhcols(); if (window.self !== window.top) { document.getElementById('myta').rows=document.getElementById('myta').rows; } else { document.getElementById('myta').focus(); }">
<h1>Keyboard Typing Practice <span id=myspan style=display:inline-block;>via <select onchange=selit(this); id=mode><option value=quote>Quote</option><option value=random>Random Thought</option><option value=headline>Headline News</option><option value=names>Names List</option><option id=oit value=words>Words List</option><option value=WORDS>Words List with Translation Links</option><option id=poit value=phrases>Phrases</option><option value=PHRASES>Phrases with Translation Links</option></select>  <select style=display:none; id="language" title="Translations courtesy of MyMemory and Google Translate ... thanks" onchange='olang=this.value;'><option value="">Translate to Language ...</option><option value="af">Afrikaans</option><option value="sq">Albanian</option><option value="am">Amharic ✨</option><option value="ar">Arabic</option><option value="hy">Armenian</option><option value="az">Azerbaijani</option><option value="eu">Basque</option><option value="be">Belarusian</option><option value="bn">Bengali ✨</option><option value="bs">Bosnian ✨</option><option value="bg">Bulgarian</option><option value="ca">Catalan</option><option value="ceb">Cebuano ✨</option><option value="zh-CN">Chinese (Simplified)</option><option value="zh-TW">Chinese (Traditional)</option><option value="co">Corsican ✨</option><option value="hr">Croatian</option><option value="cs">Czech</option><option value="da">Danish</option><option value="nl">Dutch</option><option value="en">English</option><option value="eo">Esperanto ✨</option><option value="et">Estonian</option><option value="fi">Finnish</option><option value="fr">French</option><option value="fy">Frisian ✨</option><option value="gl">Galician</option><option value="ka">Georgian</option><option value="de">German</option><option value="el">Greek</option><option value="gu">Gujarati ✨</option><option value="ht">Haitian Creole</option><option value="ha">Hausa ✨</option><option value="haw">Hawaiian ✨</option><option value="he">Hebrew</option><option value="hi">Hindi</option><option value="hmn">Hmong ✨</option><option value="hu">Hungarian</option><option value="is">Icelandic</option><option value="ig">Igbo ✨</option><option value="id">Indonesian</option><option value="ga">Irish</option><option value="it">Italian</option><option value="ja">Japanese</option><option value="jv">Javanese ✨</option><option value="kn">Kannada ✨</option><option value="kk">Kazakh ✨</option><option value="km">Khmer ✨</option><option value="rw">Kinyarwanda ✨</option><option value="ko">Korean</option><option value="ku">Kurdish ✨</option><option value="ky">Kyrgyz ✨</option><option value="lo">Lao ✨</option><option value="lv">Latvian</option><option value="lt">Lithuanian</option><option value="lb">Luxembourgish ✨</option><option value="mk">Macedonian</option><option value="mg">Malagasy ✨</option><option value="ms">Malay</option><option value="ml">Malayalam ✨</option><option value="mt">Maltese</option><option value="mi">Maori ✨</option><option value="mr">Marathi ✨</option><option value="mn">Mongolian ✨</option><option value="my">Myanmar (Burmese) ✨</option><option value="ne">Nepali ✨</option><option value="no">Norwegian</option><option value="ny">Nyanja (Chichewa) ✨</option><option value="or">Odia (Oriya) ✨</option><option value="ps">Pashto ✨</option><option value="fa">Persian</option><option value="pl">Polish</option><option value="pt">Portuguese (Portugal, Brazil)</option><option value="pa">Punjabi ✨</option><option value="ro">Romanian</option><option value="ru">Russian</option><option value="sm">Samoan ✨</option><option value="gd">Scots Gaelic ✨</option><option value="sr">Serbian</option><option value="st">Sesotho ✨</option><option value="sn">Shona ✨</option><option value="sd">Sindhi ✨</option><option value="si">Sinhala (Sinhalese) ✨</option><option value="sk">Slovak</option><option value="sl">Slovenian</option><option value="so">Somali ✨</option><option value="es">Spanish</option><option value="su">Sundanese ✨</option><option value="sw">Swahili</option><option value="sv">Swedish</option><option value="tl">Tagalog (Filipino)</option><option value="tg">Tajik ✨</option><option value="ta">Tamil ✨</option><option value="tt">Tatar ✨</option><option value="te">Telugu ✨</option><option value="th">Thai</option><option value="tr">Turkish</option><option value="tk">Turkmen ✨</option><option value="uk">Ukrainian</option><option value="ur">Urdu</option><option value="ug">Uyghur ✨</option><option value="uz">Uzbek ✨</option><option value="vi">Vietnamese</option><option value="cy">Welsh</option><option value="xh">Xhosa ✨</option><option value="yi">Yiddish</option><option value="yo">Yoruba ✨</option><option value="zu">Zulu ✨</option></select></span></h1>
<h3>RJM Programming - March, 2023   <span id=sresults style=color:purple;display:inline-block;></span><span id=oops style=color:red;display:none;font-size:8px;> ... Sorry, but Copy and Paste disabled</span></h3>
<h4>Thanks to <a target=_blank title='https://stackoverflow.com/questions/1226574/disable-pasting-text-into-html-form' href='https://stackoverflow.com/questions/1226574/disable-pasting-text-into-html-form'>https://stackoverflow.com/questions/1226574/disable-pasting-text-into-html-form</a> and <a target=_blank title='goodreads' ... thanks' href='https://www.goodreads.com/quotes'>https://www.goodreads.com/quotes</a> and <a target=_blank title='https://randomthingstodo.com/thoughts' href='https://randomthingstodo.com/thoughts'>https://randomthingstodo.com/thoughts</a> and <a target=_blank title='https://newsapi.org' href='https://newsapi.org'>https://newsapi.org</a> and <a target=_blank title='https://api.mymemory.translated.net' href='https://mymemory.translated.net/doc/spec.php'>https://api.mymemory.translated.net</a> and <a target=_blank title='https://translate.google.com' href='https://translate.google.com'>https://translate.google.com</a></h4>
<!--script type=text/javascript>
if (olang != '') {
document.write("<h4 title='Translation to language code " + olang + "' id=results></h4>");
}
</script-->
<!--form spellcheck="false"-->
<table style=width:100%;><tr><th id=lhs data-style=width:50%;>Please type this ... <span id=sone></span><input style=display:inline-block; type=text id=wpm title='Words per minute' placeholder='Words per minute'></input><span id=stwo></span> <input style=display:inline-block; type=text id=cpm title='Characters per minute' placeholder='Characters per minute'></input> </th><th data-style=width:50%;> ... Here <button onclick=resetit(); id=rbut style=display:none;>Again</button> ... <span id=sthree></span><input style=display:inline-block; type=text id=accuracy title='Accuracy%' placeholder='Accuracy%'></input><span id=sfour></span> <input style=display:inline-block; type=text id=retakes title='Retakes%' placeholder='Retakes%'></input></th></tr>
<tr><td id=lhstd>
<textarea spellcheck="false" data-onresize="resizeta(this);" id=yourta style="width:98%;background-color:rgba(102,255,255,0.5);cursor:progress;" rows=20 cols=66 data-onpaste="document.getElementById('oops').style.display='inline'; return false;"></textarea>
</td><td>
<textarea spellcheck="false" onkeydown="event.handled=true; if (numkds == 0) { setTimeout(nsgo,1000); } if (event.key === 'Backspace' || event.key === 'Delete') { numkds++ }" onkeypress="numkds++; numkps++;" onblur="if (numkds > 0 && numkps > 0) { show(); }" id=myta style="width:98%;background-color:rgba(255,255,102,0.5);" rows=20 cols=66 onpaste="document.getElementById('oops').style.display='inline'; return false;"></textarea>
</td></tr></table>
<!--/form-->
<div id=results style=display:none;></div>
<script type=text/javascript>
var ik=0;
if (document.URL.indexOf('variety=') != -1) {
if (document.URL.indexOf('variety=random') != -1) {
document.getElementById('mode').value='random';
document.write("<iframe id=myif src='./remote_files.php?url=http%3A%2F%2Frandomthingstodo.com%2Fthoughts&type=+class%3D%22card-text%22&ord=2&starting=&middling=&containing=' style='display:none;'></iframe>");
} else if (document.URL.indexOf('variety=headline') != -1) {
document.getElementById('mode').value='headline';
document.write("<iframe id=myif src='./remote_files.php?url=http%3A%2F%2Fnewsapi.org%2Fv2%2Feverything%3Fq%3Dpolitics%26from%3Ddateymd%26sortBy%3DpublishedAt%26apiKey%3Df0a62125e2df4442be7c5ec500eebbfd&type=+class%3D%22content%22&ord=1&starting=&middling=&containing=' style='display:none;'></iframe>");
} else if (document.URL.indexOf('variety=names') != -1) {
document.getElementById('mode').value='names';
} else if (document.URL.indexOf('variety=words') != -1) {
document.getElementById('mode').value='words';
} else if (document.URL.indexOf('variety=phrases') != -1) {
document.getElementById('mode').value='phrases';
} else {
document.write("<iframe id=myif src='./remote_files.php?url=http%3A%2F%2Fwww.goodreads.com%2Fquotes%2Frecently_added&type=+class%3D\"quoteText\"&ord=3&starting=&middling=&containing=' style='display:none;'></iframe>");
}
} else {
document.write("<iframe id=myif src='./remote_files.php?url=http%3A%2F%2Fwww.goodreads.com%2Fquotes%2Frecently_added&type=+class%3D\"quoteText\"&ord=3&starting=&middling=&containing=' style='display:none;'></iframe>");
}
if (document.URL.indexOf('swidth=') != -1 || 1 == 1) {
document.write('<style> #lhs, #lhstd { width: ' + (location.search.split('swidth=')[1] ? decodeURIComponent(location.search.split('swidth=')[1].split('&')[0]) : '48%') + ' !important; } </style>');
}
</script>
<iframe id=myifname onload="if (document.URL.indexOf('variety=names') == -1) { namepush(this); }" src='./PHP/surprise.php?min=4&max=8&firstname=y&youllneverfindthis=y' style='display:none;'></iframe>
<iframe id=myifword onload="if (document.URL.indexOf('variety=words') == -1) { wordpush(this); }" src='./PHP/surprise.php?min=4&max=8&youllneverfindthis=y' style='display:none;'></iframe>
<iframe id=myifphrase onload="if (document.URL.indexOf('variety=phrases') == -1) { phrasepush(this); }" src='./PHP/surprise.php?min=4&max=28&phrase=y&youllneverfindthis=y' style='display:none;'></iframe>
<iframe id=myt style=display:none; src=></iframe>
<div id=yourdiv style=display:none;></div>
</body>
</html>