<html>
<head>
<title>Word Find Game - RJM Programming - July, 2022</title>
<style>
textarea {
font-family: Courier New;
font-size: 20px;
opacity: 0.9;
z-index: 9;
padding: 0 0 0 0;
margin: 0 0 0 0;

}

#underlay {
font-family: Courier New;
font-size: 20px;
opacity: 0.3;
z-index: 1;
padding: 0 0 0 0;
margin: 0 0 0 0;
}

div.underlay {
font-family: Courier New;
font-size: 20px;
opacity: 0.3;
z-index: 2;
padding: 0 0 0 0;
margin: 0 0 0 0;
}
</style>
</head>
<body title='' onload='setTimeout(mytaow, 2000);'>
<h1>Word Find Game</h1>
<h3>RJM Programming - August, 2022 ... Score <span id=score>0/0</span> ... Forwards, backwards, up, down, diagonal 4 letters or more highlight below</h3>
<h4>Thanks to <a target=_blank title='https://developer.mozilla.org/en-US/docs/Web/API/Clipboard_API' href='//developer.mozilla.org/en-US/docs/Web/API/Selection_API'>Selection API</a></h4>

<!--table border=10 cellpadding=5>
<tr><th colspan=3>Clipboard ...</tr>
<tr><td><button onclick="pasteinto('after');">Append Below ...</button></td><td><button onclick="pasteinto('before');">Prepend Below ...</button><td><button onclick="pasteinto('cursor');">At Cursor ...</button></td></tr>
</table><br><br-->

<script type='text/javascript'>
var zdebye='';
var zzdebye='';
var lastzdebye='';
var goutstris='';
var delayis=0;
var sofar=';';
var score=0, goes=0, subscore=0;
var letters=['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'];
var ebye='', ibye=0, jbye=0, debye='', aletter=' ';
for (ibye=0; ibye<20; ibye++) {
for (jbye=0; jbye<100; jbye++) {
aletter=letters[Math.floor(Math.random() * letters.length)];
ebye+=aletter;
debye+=aletter;
}
ebye+=String.fromCharCode(10);
debye+='<br>';
}
document.write("<table><tr><td><textarea id=mytao class=editor rows=20 cols=100>" + ebye + "</textarea></td></TR><TR><td id=emailsms style=display:none;vertical-align:top;> <a target=_blank href='mailto:?subject=My%20Selection%20...&body=' id=aemail title=Email>📧</a> <a target=_blank onmouseover=\"if (smsee.length == 0 && origsmsurl.indexOf('sms:&') != -1) { smsee=prompt('Please enter SMS number to send to.', ''); if (smsee == null) { smsee=''; } else { origsmsurl=origsmsurl.replace('sms:&','sms:' + smsee + '&'); asmsurl=asmsurl.replace('sms:&','sms:' + smsee + '&'); this.href=asmsurl; } }\" ontouchstart=\"if (smsee.length == 0 && origsmsurl.indexOf('sms:&') != -1) { smsee=prompt('Please enter SMS number to send to.', ''); if (smsee == null) { smsee=''; } else { origsmsurl=origsmsurl.replace('sms:&','sms:' + smsee + '&'); asmsurl=asmsurl.replace('sms:&','sms:' + smsee + '&'); this.href=asmsurl; } }\" href='sms:&body=My%20Selection%20...' id=asms title=SMS>📟</a></td></tr></table>");
var origemailurl='mailto:?subject=My%20Selection%20...&body=';
var origsmsurl='sms:&body=My%20Selection%20...';
var smsee='';
var aemailurl=origemailurl;
var asmsurl=origsmsurl;
var sofar = '';
var sofarbefore='', sofarafter='';
var mltrans='';

function mytaow() {
var rectis=document.getElementById('mytao').getBoundingClientRect();
document.getElementById('mytao').style.width='' + eval(20 + rectis.width) + 'px';
document.getElementById('underlay').style.position='absolute';
document.getElementById('underlay').style.top='' + rectis.top + 'px';
document.getElementById('underlay').style.left='' + rectis.left + 'px';
document.getElementById('underlay').style.width='' + eval(20 + rectis.width) + 'px';
document.getElementById('underlay').style.height='' + rectis.height + 'px';
document.getElementById('underlay').innerHTML=debye;
}

function pasteinto(inmode) {
console.log('here at pasteinto');
sofar = document.querySelector(".editor").value;
console.log('here at pasteinto sofar=' + sofar + ' with sofarbefore=*' + sofarbefore + '* and sofarafter=*' + sofarafter + '*');

switch (inmode) {
case 'before':
navigator.clipboard.readText().then(
(clipText) => document.querySelector(".editor").value = clipText + sofar);
break;

case 'after':
navigator.clipboard.readText().then(
(clipText) => document.querySelector(".editor").value += clipText);
break;

default:
console.log('at cursor');
navigator.clipboard.readText().then(
(clipText) => document.querySelector(".editor").value = sofarbefore + clipText + sofarafter);
break;
}

}

//document.getElementById('mytao').addEventListener('click', showposition); // click
document.querySelector(".editor").addEventListener('click', showposition); // click
document.querySelector(".editor").addEventListener('keyup', showpositionkp); // click

function showposition(event) { // thanks to https://stackoverflow.com/questions/62310186/how-do-you-get-the-current-cursor-position-in-a-textarea-whenever-the-cursor-o
console.log(event.target.selectionStart);
if (document.querySelector(".editor").value != '') {
//onsole.log('yes, here');
sofarbefore=document.querySelector(".editor").value.substring(0, event.target.selectionStart);
sofarafter=document.querySelector(".editor").value.substring(event.target.selectionStart);
//console.log('sofarbefore=' + sofarbefore + ' and sofarafter=' + sofarafter);
}
}

function showpositionkp(event) { // thanks to https://stackoverflow.com/questions/62310186/how-do-you-get-the-current-cursor-position-in-a-textarea-whenever-the-cursor-o
console.log(event.target.selectionStart);
if (document.querySelector(".editor").value != '') {
console.log('yes, here');
sofarbefore=document.querySelector(".editor").value.substring(0, event.target.selectionStart);
sofarafter=document.querySelector(".editor").value.substring(event.target.selectionStart);
console.log('sofarbefore=' + sofarbefore + ' and sofarafter=' + sofarafter);
}
}

function retry() {
if (('' + document.getElementById('nameif').title).trim() != '') {
document.getElementById('nameif').src=document.getElementById('nameif').title;
document.getElementById('nameif').title='';
} else {
document.getElementById('mytao').style.cursor=cscore('pointer', subscore);
}
}

function cscore(cursortype, ssc) {
if (lastzdebye != zdebye && lastzdebye != zzdebye) {
if (ssc != 0) { goes++; }
if (ssc > 0) {
score+=ssc;
if (zzdebye.indexOf('<font') != -1) { // && zdebye.indexOf('<font') == -1) {
zdebye=zzdebye;
}
if (zdebye.indexOf('<font') != -1) {
if (document.getElementById('underlay').innerHTML.replace(/\<br\>/g,'').indexOf('<') == -1) {
document.getElementById('others').innerHTML+=document.getElementById('underlay').outerHTML.split('>')[0].replace(' id=', ' class=').replace(/\ color\=\"red\"/g, ' color="black" style="background-color:lightgreen;"') + '>' + zdebye.replace(/\ color\=\"red\"/g, ' color="black" style="background-color:lightgreen;"') + '</div>';
} else {
document.getElementById('others').innerHTML+=document.getElementById('underlay').outerHTML.replace(' id=', ' class=').replace(/\ color\=\"red\"/g, ' color="black" style="background-color:lightgreen;"');
}
}
} else {
if (zzdebye.indexOf('<font') != -1) { // && zdebye.indexOf('<font') == -1) {
zdebye=zzdebye;
//if (document.getElementById('underlay').innerHTML.replace(/\<br\>/g,'').indexOf('<') == -1) {
//alert(zdebye);
//}
}
if (zdebye.indexOf('<font') != -1) {
if (document.getElementById('underlay').innerHTML.replace(/\<br\>/g,'').indexOf('<') == -1) {
document.getElementById('others').innerHTML+=document.getElementById('underlay').outerHTML.split('>')[0].replace(' id=', ' class=').replace(/\ color\=\"red\"/g, ' color="black" style="background-color:orange;"') + '>' + zdebye.replace(/\ color\=\"red\"/g, ' color="black" style="background-color:orange;"') + '</div>';
} else {
document.getElementById('others').innerHTML+=document.getElementById('underlay').outerHTML.replace(' id=', ' class=').replace(/\ color\=\"red\"/g, ' color="black" style="background-color:orange;"');
}
}
}
document.getElementById('score').innerHTML='' + score + '/' + goes;
subscore=0;
lastzdebye=zdebye;
}
zzdebye='';
zdebye='';
return cursortype;
}

function checkname(iois, iserror) {
var ifnd=-1, newname='';
var revsisc='', jrev=0;
console.log('checkname1');
if (iserror) {
if (iois.src.indexOf('second=') == -1 && iois.src.indexOf('iswordthere=') != -1) {
if (('' + iois.title).trim() != '') {
//document.getElementById('mytao').style.cursor='pointer';
document.body.title='';
iois.src=iois.title;
iois.title='';
} else {
//alert(1);
for (jrev=eval(-1 + eval('' + decodeURIComponent(iois.src.split('iswordthere=')[1].split('&')[0].split('#')[0]).length)); jrev>=0; jrev--) {
revsisc+=decodeURIComponent(iois.src.split('iswordthere=')[1].split('&')[0].split('#')[0]).substring(jrev, eval(1 + jrev));
}
//alert('Newname=' + revsisc);
document.body.title='';
iois.title='';
iois.src=iois.src.split('iswordthere=')[0] + 'second=y&iswordthere=' + encodeURIComponent(revsisc);
}
} else {
document.getElementById('mytao').style.cursor=cscore('pointer', subscore);
}
} else {
if (iois != null) {
ifnd=iois.src.indexOf('iswordthere=');
console.log('checkname2 ' + ifnd);
var aconto = (iois.contentWindow || iois.contentDocument);
if (aconto != null && ifnd != -1) {
console.log('checkname3 ' + ifnd);
if (aconto.document) { aconto = aconto.document; }
if (aconto.body != null) {
console.log('checkname4 ' + ifnd);
if (aconto.body.innerHTML.indexOf('</p>') != -1 && aconto.body.innerHTML.indexOf('></p>') == -1) {
document.body.title='';
iois.title='';
document.getElementById('mytao').style.cursor=cscore('pointer', Math.abs(subscore));
console.log('Found name ' + aconto.body.innerHTML.split('</p>')[0].split('>')[eval(-1 + aconto.body.innerHTML.split('</p>')[0].split('>').length)]);
} else if (aconto.body.innerHTML.indexOf('<') == -1 && aconto.body.innerHTML.trim() != '') {
document.body.title='';
iois.title='';
document.getElementById('mytao').style.cursor=cscore('pointer', Math.abs(subscore));
console.log('Found name ' + aconto.body.innerHTML);
} else if (iois.src.indexOf('second=') == -1 && iois.src.indexOf('iswordthere=') != -1) {
if (('' + iois.title).trim() != '') {
//document.getElementById('mytao').style.cursor='pointer';
document.body.title='';
iois.src=iois.title;
iois.title='';
} else {
//alert(1);
for (jrev=eval(-1 + eval('' + decodeURIComponent(iois.src.split('iswordthere=')[1].split('&')[0].split('#')[0]).length)); jrev>=0; jrev--) {
revsisc+=decodeURIComponent(iois.src.split('iswordthere=')[1].split('&')[0].split('#')[0]).substring(jrev, eval(1 + jrev));
}
//alert('Newname=' + revsisc);
document.body.title='';
iois.title='';
iois.src=iois.src.split('iswordthere=')[0] + 'second=y&iswordthere=' + encodeURIComponent(revsisc);
}
} else {
document.getElementById('mytao').style.cursor=cscore('pointer', subscore);
}
} else {
console.log('checkname5 ' + ifnd);
//alert('WhY?');
document.getElementById('mytao').style.cursor=cscore('pointer', subscore);
}
} else if (ifnd != -1) {
console.log('checkname6 ' + ifnd);
ifnd=ifnd;
if (iois.src.indexOf('second=') == -1 && iois.src.indexOf('iswordthere=') != -1) {
//alert(11);
for (jrev=eval(-1 + eval('' + decodeURIComponent(iois.src.split('iswordthere=')[1].split('&')[0].split('#')[0]).length)); jrev>=0; jrev--) {
revsisc+=decodeURIComponent(iois.src.split('iswordthere=')[1].split('&')[0].split('#')[0]).substring(jrev, eval(1 + jrev));
}
//alert('newname=' + revsisc);
iois.src=iois.src.split('iswordthere=')[0] + 'second=y&iswordthere=' + encodeURIComponent(revsisc);
} else {
document.getElementById('mytao').style.cursor=cscore('pointer', subscore);
}
}
}
}
}

function getmltrans(instris) {
goutstris='';
outstris=instris;
var ebay=ebye, jb=0, kb=2;
while (outstris.indexOf(String.fromCharCode(10)) != -1) {
outstris=outstris.replace(/\ /g,'').replace(String.fromCharCode(10),'');
}
while (ebay.indexOf(String.fromCharCode(10)) != -1) {
ebay=ebay.replace(/\ /g,'').replace(String.fromCharCode(10),'');
}
var onepos=ebay.indexOf(outstris);
var linesare=instris.split(String.fromCharCode(10));
var xlinesare=ebye.split(String.fromCharCode(10));
var zlinesare=debye.split('<br>');
zdebye=debye;
zzdebye=debye;
if (eval('' + linesare.length) == 1 && eval('' + outstris.length) >= 4) {
if (onepos != -1) {
zzdebye=zzdebye.replace(outstris, '<font color="red">' + outstris + '</font>');
//alert(zzdebye);
}
return outstris;
}
if (eval('' + linesare.length) > 3) {
var startpos=eval(onepos % 100);
var endpos=eval(eval(onepos + eval('' + outstris.length)) % 100);
if (endpos == 0 && startpos > 75) { endpos=100; }
console.log('outstris=' + outstris.replace(/\ /g,'*') + ' ... lines ' + linesare.length + ' ... startpos=' + startpos + ' ... endpos=' + endpos + ' ' + ebay.indexOf(outstris) + String.fromCharCode(10) + ebay);
var izero=Math.floor(onepos / 100);
if (startpos > endpos) {
if (eval(eval('' + startpos) - eval(-2 + eval('' + linesare.length))) == eval('' + endpos)) {
outstris=(xlinesare[izero] + ' ').substring(startpos, eval(1 + startpos));
if (startpos > 50) {
console.log(zlinesare[izero].substring(eval(-30 + startpos), eval(0 + startpos)) + '<font color=red>' + (xlinesare[izero] + ' ').substring(startpos, eval(1 + startpos)) + '</font>');
zdebye=zdebye.replace((xlinesare[izero] + ' ').substring(eval(-30 + startpos), eval(1 + startpos)), (xlinesare[izero] + ' ').substring(eval(-30 + startpos), eval(0 + startpos)) + '<font color="red">' + (xlinesare[izero] + ' ').substring(startpos, eval(1 + startpos)) + '</font>');
} else {
zdebye=zdebye.replace((xlinesare[izero] + ' ').substring(startpos, eval(30 + startpos)), '<font color="red">' + (xlinesare[izero] + ' ').substring(startpos, eval(1 + startpos)) + '</font>' + (xlinesare[izero] + ' ').substring(eval(1 + startpos), eval(30 + startpos)));
}
//alert('first character is ' + outstris + ' is startpos=' + startpos + ' in xlinesare[' + izero + ']=' + xlinesare[izero]);
izero++;
for (jb=izero; jb<xlinesare.length; jb++) {
if (kb <= eval('' + linesare.length)) {
startpos--;
outstris+=(xlinesare[jb] + ' ').substring(startpos, eval(1 + startpos));
if (startpos > 50) {
zdebye=zdebye.replace((xlinesare[jb] + ' ').substring(eval(-30 + startpos), eval(1 + startpos)), (xlinesare[jb] + ' ').substring(eval(-30 + startpos), eval(0 + startpos)) + '<font color="red">' + (xlinesare[jb] + ' ').substring(startpos, eval(1 + startpos)) + '</font>');
} else {
zdebye=zdebye.replace((xlinesare[jb] + ' ').substring(startpos, eval(30 + startpos)), '<font color="red">' + (xlinesare[jb] + ' ').substring(startpos, eval(1 + startpos)) + '</font>' + (xlinesare[jb] + ' ').substring(eval(1 + startpos), eval(30 + startpos)));
}
}
kb++;
}
goutstris=outstris;
delayis=500;
setTimeout(afterbit, delayis);
//alert('izero=' + izero + ' ' + outstris + ' left diagonal string potentially ' + linesare.length + ' long starting at ' + eval(onepos % 100) + ' and ending at ' + endpos);
} else {
outstris='';
}
} else {
if (eval(eval('' + endpos) - eval(0 + eval('' + linesare.length))) == eval('' + startpos)) {
outstris=(xlinesare[izero] + ' ').substring(startpos, eval(1 + startpos));
if (startpos > 50) {
console.log(zlinesare[izero].substring(eval(-30 + startpos), eval(0 + startpos)) + '<font color=red>' + (xlinesare[izero] + ' ').substring(startpos, eval(1 + startpos)) + '</font>');
zdebye=zdebye.replace((xlinesare[izero] + ' ').substring(eval(-30 + startpos), eval(1 + startpos)), (xlinesare[izero] + ' ').substring(eval(-30 + startpos), eval(0 + startpos)) + '<font color="red">' + (xlinesare[izero] + ' ').substring(startpos, eval(1 + startpos)) + '</font>');
} else {
zdebye=zdebye.replace((xlinesare[izero] + ' ').substring(startpos, eval(30 + startpos)), '<font color="red">' + (xlinesare[izero] + ' ').substring(startpos, eval(1 + startpos)) + '</font>' + (xlinesare[izero] + ' ').substring(eval(1 + startpos), eval(30 + startpos)));
}
izero++;
for (jb=izero; jb<xlinesare.length; jb++) {
if (kb <= eval('' + linesare.length)) {
startpos++;
outstris+=(xlinesare[jb] + ' ').substring(startpos, eval(1 + startpos));
if (startpos > 50) {
zdebye=zdebye.replace((xlinesare[jb] + ' ').substring(eval(-30 + startpos), eval(1 + startpos)), (xlinesare[jb] + ' ').substring(eval(-30 + startpos), eval(0 + startpos)) + '<font color=red>' + (xlinesare[jb] + ' ').substring(startpos, eval(1 + startpos)) + '</font>');
} else {
zdebye=zdebye.replace((xlinesare[jb] + ' ').substring(startpos, eval(30 + startpos)), '<font color=red>' + (xlinesare[jb] + ' ').substring(startpos, eval(1 + startpos)) + '</font>' + (xlinesare[jb] + ' ').substring(eval(1 + startpos), eval(30 + startpos)));
}
}
kb++;
}
goutstris=outstris;
delayis=500;
setTimeout(afterbit, delayis);
//alert(outstris + ' right diagonal string potentially ' + linesare.length + ' long starting at ' + eval(onepos % 100) + ' and ending at ' + endpos);
} else if (eval(-1 + endpos) == startpos || (startpos == 99 && endpos == 0)) {
console.log('Startpos=' + startpos);
outstris=(xlinesare[izero] + ' ').substring(startpos, eval(1 + startpos));
if (startpos > 50) {
console.log(zlinesare[izero].substring(eval(-30 + startpos), eval(0 + startpos)) + '<font color=red>' + (xlinesare[izero] + ' ').substring(startpos, eval(1 + startpos)) + '</font>');
zdebye=zdebye.replace((xlinesare[izero] + ' ').substring(eval(-30 + startpos), eval(1 + startpos)), (xlinesare[izero] + ' ').substring(eval(-30 + startpos), eval(0 + startpos)) + '<font color=red>' + (xlinesare[izero] + ' ').substring(startpos, eval(1 + startpos)) + '</font>');
} else {
zdebye=zdebye.replace((xlinesare[izero] + ' ').substring(startpos, eval(30 + startpos)), '<font color=red>' + (xlinesare[izero] + ' ').substring(startpos, eval(1 + startpos)) + '</font>' + (xlinesare[izero] + ' ').substring(eval(1 + startpos), eval(30 + startpos)));
}
izero++;
for (jb=izero; jb<xlinesare.length; jb++) {
if (kb <= eval('' + linesare.length)) {
outstris+=(xlinesare[jb] + ' ').substring(startpos, eval(1 + startpos));
if (startpos > 50) {
zdebye=zdebye.replace((xlinesare[jb] + ' ').substring(eval(-30 + startpos), eval(1 + startpos)), (xlinesare[jb] + ' ').substring(eval(-30 + startpos), eval(0 + startpos)) + '<font color=red>' + (xlinesare[jb] + ' ').substring(startpos, eval(1 + startpos)) + '</font>');
} else {
zdebye=zdebye.replace((xlinesare[jb] + ' ').substring(startpos, eval(30 + startpos)), '<font color=red>' + (xlinesare[jb] + ' ').substring(startpos, eval(1 + startpos)) + '</font>' + (xlinesare[jb] + ' ').substring(eval(1 + startpos), eval(30 + startpos)));
}
}
kb++;
}
goutstris=outstris;
delayis=500;
setTimeout(afterbit, delayis);
//alert('izero=' + izero + ' ' + outstris + ' up or down');
} else {
outstris='';
}
}
//alert('string potentially ' + linesare.length + ' long starting at ' + eval(onepos % 100) + ' and ending at ' + eval(eval(onepos + eval('' + outstris.length)) % 100));
}

return outstris;
}

function afterbit() {
if (goutstris == '') { return ''; }
var revsis='';
var documentgetSelectiontoString=goutstris;
if (eval('' + documentgetSelectiontoString.length) >= 4) {
goutstris='';
if (zdebye != '') {
document.getElementById('underlay').innerHTML=zdebye;
}
//document.getElementById('emailsms').style.display='table-cell';
document.getElementById('mytao').title=documentgetSelectiontoString;
aemailurl=origemailurl + encodeURIComponent(documentgetSelectiontoString);
document.getElementById('aemail').href=aemailurl;
asmsurl=origsmsurl + encodeURIComponent(String.fromCharCode(10) + documentgetSelectiontoString);
document.getElementById('asms').href=asmsurl;
for (var irev=eval(-1 + eval('' + documentgetSelectiontoString.length)); irev>=0; irev--) {
revsis+=documentgetSelectiontoString.substring(irev, eval(1 + irev));
}
console.log(documentgetSelectiontoString);
subscore=eval(0 - eval('' + documentgetSelectiontoString.length));
console.log('../PHP/surprise.php?min=' + eval(1 + eval('' + documentgetSelectiontoString.length)) + '&max=' + eval(1 + eval('' + documentgetSelectiontoString.length)) + '&firstJUNKname=y&youllneverfindthis=y' + '&iswordthere=' + documentgetSelectiontoString.toLowerCase());
setTimeout(retry, 8000);
document.getElementById('mytao').style.cursor='progress';
document.getElementById('nameif').title='../PHP/surprise.php?miZn=' + eval(1 + eval('' + documentgetSelectiontoString.length)) + '&maZx=' + eval(1 + eval('' + documentgetSelectiontoString.length)) + '&firstJUNKname=y&youllneverfindthis=y' + '&second=y&iswordthere=' + encodeURIComponent(revsis);
document.getElementById('nameif').src='../PHP/surprise.php?miZn=' + eval(1 + eval('' + documentgetSelectiontoString.length)) + '&maZx=' + eval(1 + eval('' + documentgetSelectiontoString.length)) + '&firstJUNKname=y&youllneverfindthis=y' + '&iswordthere=' + encodeURIComponent(documentgetSelectiontoString.toLowerCase());
} else {
document.getElementById('mytao').style.cursor='not-allowed';
document.body.title='Already tried.';
}
return goutstris;
}

// addEventListener version
document.addEventListener('selectionchange', () => {
var revsis='';
var documentgetSelectiontoString=getmltrans(document.getSelection().toString());
if (eval('' + documentgetSelectiontoString.length) >= 4) {
if (sofar.indexOf(';' + documentgetSelectiontoString + ';') == -1) {
sofar+=documentgetSelectiontoString + ';';
if (goutstris == '') {
//document.getElementById('emailsms').style.display='table-cell';
document.getElementById('mytao').title=documentgetSelectiontoString;
aemailurl=origemailurl + encodeURIComponent(documentgetSelectiontoString);
document.getElementById('aemail').href=aemailurl;
asmsurl=origsmsurl + encodeURIComponent(String.fromCharCode(10) + documentgetSelectiontoString);
document.getElementById('asms').href=asmsurl;
for (var irev=eval(-1 + eval('' + documentgetSelectiontoString.length)); irev>=0; irev--) {
revsis+=documentgetSelectiontoString.substring(irev, eval(1 + irev));
}
console.log(documentgetSelectiontoString);
subscore=eval(0 - eval('' + documentgetSelectiontoString.length));
console.log('../PHP/surprise.php?min=' + eval(1 + eval('' + documentgetSelectiontoString.length)) + '&max=' + eval(1 + eval('' + documentgetSelectiontoString.length)) + '&firstJUNKname=y&youllneverfindthis=y' + '&iswordthere=' + documentgetSelectiontoString.toLowerCase());
setTimeout(retry, 8000);
document.getElementById('mytao').style.cursor='progress';
document.getElementById('nameif').title='../PHP/surprise.php?miZn=' + eval(1 + eval('' + documentgetSelectiontoString.length)) + '&maZx=' + eval(1 + eval('' + documentgetSelectiontoString.length)) + '&firstJUNKname=y&youllneverfindthis=y' + '&second=y&iswordthere=' + encodeURIComponent(revsis);
document.getElementById('nameif').src='../PHP/surprise.php?miZn=' + eval(1 + eval('' + documentgetSelectiontoString.length)) + '&maZx=' + eval(1 + eval('' + documentgetSelectiontoString.length)) + '&firstJUNKname=y&youllneverfindthis=y' + '&iswordthere=' + encodeURIComponent(documentgetSelectiontoString.toLowerCase());
}
} else {
goutstris='';
document.getElementById('mytao').style.cursor='not-allowed';
document.body.title='Already tried.';
}
}
});

// addEventListener version
document.addEventListener('selectstart', () => {
document.getElementById('mytao').title='';
aemailurl=origemailurl;
asmsurl=origsmsurl;
document.getElementById('mytao').style.cursor=cscore('pointer', subscore);
document.body.title='';
console.log('Selection started');
});

if (window.self !== window.top) {
delayis=delayis;
} else {
const tx = document.getElementsByTagName("textarea"); // thanks to https://stackoverflow.com/questions/454202/creating-a-textarea-with-auto-resize
for (let i = 0; i < tx.length; i++) {
tx[i].setAttribute("style", "height:" + (tx[i].scrollHeight) + "px;overflow-y:hidden;");
tx[i].addEventListener("input", OnInput, false);
}
}

function OnInput() {
this.style.height = "auto";
this.style.height = (this.scrollHeight) + "px";
}

</script>
<iframe id=nameif title='' style=display:none; onload='checkname(this, false);' onerror='checkname(this, true);' src=></iframe>
<div id=underlay></div>
<div id=others></div>
</body>
</html>