17,18d16
< # https://www-rjmprogramming-com-au.translate.goog/ITblog/perl-cgi-intranet-audio-tutorial/?_x_tr_sl=en&_x_tr_tl=eu&_x_tr_hl=en-GB&_x_tr_pto=nui
< 
43,53d40
< my $voice = "";
< if (defined $FORM{voice}) {
<   $voice = $FORM{voice};
<   $voice =~ s/%20/ /ig;
<   $voice =~ s/%2D/-/ig;
<   $voice =~ s/%2d/-/ig;
< }
< my $lang = "";
< if (defined $FORM{lang}) {
<   $lang = $FORM{lang};
< }
208c195
< print " var ls='', ns='', qwr='', wo=null, hears=[], vsexthears=[], exthears=[], jd=0, yes=false, lhear='', lang='${lang}', latestu=''; ";
---
> print " var ls='', ns='', qwr='', wo=null, hears=[], vsexthears=[], exthears=[], jd=0, yes=false, lhear=''; ";
232,249d218
< print "   if (lang != '') { ";
< print "     var alst=document.getElementsByTagName('a'); ";
< print "     for (var ia=0; ia<alst.length; ia++) { ";
< print "       if (alst[ia].outerHTML.indexOf('_blank') != -1 && alst[ia].outerHTML.indexOf('/ITblog') != -1) { ";
< print "        alst[ia].title='Click also opens Google Translated content'; ";
< print "        alst[ia].setAttribute('data-nongt', alst[ia].href); ";
< print "        alst[ia].setAttribute('data-gt', 'https://www-rjmprogramming-com-au.translate.goog/ITblog/' + alst[ia].innerHTML.toLowerCase().replace('+','').replace('/','').replace(' ','-').replace('/','').replace(' ','-').replace('/','').replace(' ','-').replace('/','').replace(' ','-').replace('/','').replace(' ','-').replace(' ','-').replace(' ','-').replace(' ','-').replace(' ','-').replace(' ','-').replace(/---/g,'-').replace(/--/g,'-').replace(/\ /g,'-') + '/?_x_tr_sl=en&_x_tr_tl=' + lang + '&_x_tr_hl=en-GB&_x_tr_pto=nui'); ";
< print "        alst[ia].onclick = function(evt){ onc(evt.target);   };";
< print "        alst[ia].href = 'https://www-rjmprogramming-com-au.translate.goog/ITblog/' + alst[ia].innerHTML.toLowerCase().replace(/\ /g,'-') + '/?_x_tr_sl=en&_x_tr_tl=' + lang + '&_x_tr_hl=en-GB&_x_tr_pto=nui'; ";
< print "       } ";
< print "     } ";
< print "   } ";
< print " } ";
< print " function postonc() { ";
< print "  if (latestu != '') {  window.open(latestu,'mywif'); document.getElementById('premywif').style.display='block'; document.getElementById('mywif').style.display='block'; document.getElementById('premywif').scrollIntoView(); } latestu=''; ";
< print " } ";
< print " function onc(thisa) { ";
< print "  latestu=('' + thisa.getAttribute('data-nongt')).replace('null','').replace('undefined',''); setTimeout(postonc, 3000); ";
252c221
< print "   var beg=proposed.split('<')[0].split('[')[0]; var prebegs=proposed.split('&lt;?php');  for (var jjj=1; jjj<prebegs.length; jjj++) { proposed=proposed.replace('&lt;?php' + prebegs[jjj].split('?&gt;')[0] + '?&gt;', 'code');  }  prebegs=proposed.split('&amp;#');  for (jjj=1; jjj<prebegs.length; jjj++) { proposed=proposed.replace('&amp;#' + prebegs[jjj].split(';')[0] + ';', ' ');  } var begs=proposed.split('>'); for (var jj=1; jj<begs.length; jj++) { if (begs[jj].indexOf('</code') != -1) { beg+=' code'; } else { beg+=' ' + begs[jj].split('<')[0].split('[')[0]; } } ";
---
> print "   var beg=proposed.split('<')[0].split('[')[0]; var begs=proposed.split('>'); for (var jj=1; jj<begs.length; jj++) { beg+=' ' + begs[jj].split('<')[0].split('[')[0]; } ";
254c223
< print " function closeit() { if (wo) { if (!wo.closed) { wo.close(); wo=null;   } else { wo=null;  } if (yes && hears.length > 0) { hear(hears[0]); hears.shift();  } else if (yes) {  yes=false; hears=exthears;  } return '';  } setTimeout(closeit, 15000); ";
---
> print " function closeit() { if (wo) { if (!wo.closed) { wo.close(); wo=null;   } else { wo=null;  } if (yes && hears.length > 0) { hear(hears[0]); hears.shift();  } return '';  } setTimeout(closeit, 15000); ";
256c225
< print " function exthear(xwhat) { lhear=''; var what=xwhat; for (var iijj=0; iijj<vsexthears.length; iijj++) { if (1 == 2 && xwhat.toLowerCase().trim().indexOf(vsexthears[iijj].toLowerCase().trim()) == -1) {   alert(xwhat + ' does not contain ' + vsexthears[iijj].toLowerCase().trim());   } else if (xwhat.toLowerCase().trim().indexOf(vsexthears[iijj].toLowerCase().trim()) != -1) { what=exthears[iijj]; while (what.indexOf(String.fromCharCode(10)) != -1) { what=what.replace(String.fromCharCode(10),' '); } while (what.indexOf(String.fromCharCode(39)) != -1) { what=what.replace(String.fromCharCode(39),''); } while (what.indexOf(String.fromCharCode(34)) != -1) { what=what.replace(String.fromCharCode(34),' '); }  while (what.indexOf('(') != -1) { what=what.replace('(',' '); }  while (what.indexOf(')') != -1) { what=what.replace(')',' '); }  while (what.indexOf('   ') != -1) { what=what.replace('   ',' '); }  while (what.indexOf('  ') != -1) { what=what.replace('  ',' '); }    }    } lhear='';  if (wo) { if (!wo.closed) { wo.close(); wo=null;   } else { wo=null;  }  }  wo=window.open('HTTP://localhost:8888/macos_say_record.php?docronwork=say${voice}%20' + encodeURIComponent(what.split('($#@!')[0]).substring(0,600),'_blank','top=150,left=50,width=50,height=50');  setTimeout(closeit, 65000);  ";
---
> print " function exthear(xwhat) { lhear=''; var what=xwhat; for (var iijj=0; iijj<vsexthears.length; iijj++) { if (1 == 2 && xwhat.toLowerCase().trim().indexOf(vsexthears[iijj].toLowerCase().trim()) == -1) {   alert(xwhat + ' does not contain ' + vsexthears[iijj].toLowerCase().trim());   } else if (xwhat.toLowerCase().trim().indexOf(vsexthears[iijj].toLowerCase().trim()) != -1) { what=exthears[iijj]; while (what.indexOf(String.fromCharCode(10)) != -1) { what=what.replace(String.fromCharCode(10),' '); } while (what.indexOf(String.fromCharCode(39)) != -1) { what=what.replace(String.fromCharCode(39),' '); } while (what.indexOf(String.fromCharCode(34)) != -1) { what=what.replace(String.fromCharCode(34),' '); } while (what.indexOf('   ') != -1) { what=what.replace('   ',' '); }  while (what.indexOf('  ') != -1) { what=what.replace('  ',' '); } }    } lhear='';  if (wo) { if (!wo.closed) { wo.close(); wo=null;   } else { wo=null;  }  }  wo=window.open('HTTP://localhost:8888/macos_say_record.php?docronwork=say%20' + encodeURIComponent(what).substring(0,600),'_blank','top=150,left=50,width=50,height=50');  setTimeout(closeit, 65000);  ";
258c227
< print " function lhears() { what=lhear;   if (what == '') { return ''; } if (wo) { if (!wo.closed) { wo.close(); wo=null;   } else { wo=null;  }  }  wo=window.open('HTTP://localhost:8888/macos_say_record.php?docronwork=say${voice}%20' + encodeURIComponent(what),'_blank','top=150,left=50,width=50,height=50');  setTimeout(closeit, 15000); ";
---
> print " function lhears() { what=lhear;   if (what == '') { return ''; } if (wo) { if (!wo.closed) { wo.close(); wo=null;   } else { wo=null;  }  }  wo=window.open('HTTP://localhost:8888/macos_say_record.php?docronwork=say%20' + encodeURIComponent(what),'_blank','top=150,left=50,width=50,height=50');  setTimeout(closeit, 15000); ";
260c229
< print " function hear(what) { if (lhear == '') { lhear=what; setTimeout(lhears, 4000);  } if (wo) { if (!wo.closed) { wo.close(); wo=null;   } else { wo=null;  }  }  wo=window.open('HTTP://localhost:8888/macos_say_record.php?docronwork=say${voice}%20' + encodeURIComponent(what),'_blank','top=150,left=50,width=50,height=50');  setTimeout(closeit, 15000); ";
---
> print " function hear(what) { if (lhear == '') { lhear=what; setTimeout(lhears, 4000);  } if (wo) { if (!wo.closed) { wo.close(); wo=null;   } else { wo=null;  }  }  wo=window.open('HTTP://localhost:8888/macos_say_record.php?docronwork=say%20' + encodeURIComponent(what),'_blank','top=150,left=50,width=50,height=50');  setTimeout(closeit, 15000); ";
267c236
< print "<h2 style='font-family:Courier New;'><span id=myspan><a ondblclick='yes=true; setTimeout(hearall,1000);' id=mya title='MacOS MAMP HTTP://localhost:8888/macos_say_record.php text to audio ... download instructions, as relevant, can be determined via a read of https://www.rjmprogramming.com.au/ITblog/mamp-timekeeping-web-application-visibility-tutorial/ ... double click for all Tutorial Title audios, also, sequenced' style=cursor:pointer;background-color:lightgreen; onclick=\" if (wo) { return '';  }  if (wo) { if (!wo.closed) { wo.close(); wo=null;   } else { wo=null;  }  }  wo=window.open('HTTP://localhost:8888/macos_say_record.php?docronwork=say${voice}%20Hello%20$first_name%20$last_name','_blank','top=150,left=50,width=50,height=50');  setTimeout(closeit, 15000);  \">Hello $first_name $last_name</a></span><br>&nbsp;Local: <span id=mytime></span><br>Server: <span id=mystime>$dmy $hms</span> $dttz </h2><h4>";
---
> print "<h2 style='font-family:Courier New;'><span id=myspan><a ondblclick='yes=true; setTimeout(hearall,1000);' id=mya title='MacOS MAMP HTTP://localhost:8888/macos_say_record.php text to audio ... download instructions, as relevant, can be determined via a read of https://www.rjmprogramming.com.au/ITblog/mamp-timekeeping-web-application-visibility-tutorial/ ... double click for all Tutorial Title audios, also, sequenced' style=cursor:pointer;background-color:lightgreen; onclick=\" if (wo) { return '';  }  if (wo) { if (!wo.closed) { wo.close(); wo=null;   } else { wo=null;  }  }  wo=window.open('HTTP://localhost:8888/macos_say_record.php?docronwork=say%20Hello%20$first_name%20$last_name','_blank','top=150,left=50,width=50,height=50');  setTimeout(closeit, 15000);  \">Hello $first_name $last_name</a></span><br>&nbsp;Local: <span id=mytime></span><br>Server: <span id=mystime>$dmy $hms</span> $dttz </h2><h4>";
449c418
< print "</h4>" . $rest . "<br><br><iframe id=myif src='/hello_get.html' style='width:100%; height:1500px;'></iframe><br><a href='#myspan' title='Back to top' id=premywif style=display:none;>&#11014; Back to top</a><br><iframe id=mywif name=mywif src='' style='display:none; width:100%; height:1500px;'></iframe></body>";
---
> print "</h4>" . $rest . "<br><br><iframe id=myif src='/hello_get.html' style='width:100%; height:1500px;'></iframe></body>";
