// macos_say_record.js // RJM Programming // Help get, to work, MAMP URLs like HTTP://localhost:8888/macos_say_record.php?andclose=y&docronwork=say%20hello%20there var wo_ismsr=null; var wmsrcd=false; var minusvmsr=''; var icountmsr=0, jcountmsr=0; var connectionmsr=true; function cmgdafmsr() { if (event.target.outerHTML.indexOf(' data-foundcommentary=') > event.target.outerHTML.indexOf('<') && event.target.outerHTML.indexOf(' data-foundcommentary=') < event.target.outerHTML.indexOf('>')) { wo_ismsr=window.open('HTTP://localhost:8888/macos_say_record.php?andclose=y&docronwork=say' + encodeURIComponent(minusvmsr) + '%20' + encodeURIComponent(event.target.getAttribute('data-foundcommentary')), 'ifh', 'top=50,left=50,width=500,height=500'); //'_blank', 'top=50,left=50,width=500,height=500'); return true; } else if (event.target.outerHTML.indexOf(' data-commentary=') > event.target.outerHTML.indexOf('<') && event.target.outerHTML.indexOf(' data-commentary=') < event.target.outerHTML.indexOf('>')) { wo_ismsr=window.open('HTTP://localhost:8888/macos_say_record.php?andclose=y&docronwork=say' + encodeURIComponent(minusvmsr) + '%20' + encodeURIComponent(event.target.getAttribute('data-commentary')), 'ifh', 'top=50,left=50,width=500,height=500'); //'_blank', 'top=50,left=50,width=500,height=500'); return true; } return false; } function cmfmsr() { if (!cmgdafmsr()) { if (('' + event.target.title) != '') { wo_ismsr=window.open('HTTP://localhost:8888/macos_say_record.php?andclose=y&docronwork=say' + encodeURIComponent(minusvmsr) + '%20Title%20is%20' + encodeURIComponent(event.target.title), 'ifh', 'top=50,left=50,width=500,height=500'); //'_blank', 'top=50,left=50,width=500,height=500'); //alert('Title=' + String.fromCharCode(10) + event.target.title); } else if (('' + event.target.value).replace(/^undefined$/g,'').replace(/^null$/g,'') != '') { wo_ismsr=window.open('HTTP://localhost:8888/macos_say_record.php?andclose=y&docronwork=say' + encodeURIComponent(minusvmsr) + '%20Value%20is%20' + encodeURIComponent(event.target.value), 'ifh', 'top=50,left=50,width=500,height=500'); //'_blank', 'top=50,left=50,width=500,height=500'); //alert('Value=' + String.fromCharCode(10) + event.target.value); } else if (('' + event.target.outerHTML).indexOf('><') == -1 && ('' + event.target.outerHTML).indexOf(''; document.getElementById('spansel').innerHTML=xsmsr; //alert(110); } } else { wo_ismsr.close(); wo_ismsr=null; //alert(1110); } //} else { //alert(11110); } } function dostuffmsr() { var relstrmsr='', exctheremsr=false; var iels=0, jels=0, kels=0; var elsare=document.getElementsByTagName('*'); //commentary_array=['.tbanner', 'Tbanner is class', '.bbanner', 'Bbanner is class']; for (iels=0; iels')) { relstrmsr=' ' + elsare[iels].outerHTML.split(' class="')[1].split('"')[0] + ' '; } if (relstrmsr.indexOf(' ' + commentary_array[jels].substring(1) + ' ') != -1) { elsare[iels].setAttribute('data-foundcommentary', commentary_array[eval(1 + eval('' + jels))]); elsare[iels].addEventListener("contextmenu", cmgdafmsr, false); exctheremsr=true; console.log('yes more, array'); } } else if (commentary_array[jels].trim().substring(0,1) == '#') { relstrmsr=''; if (elsare[iels].outerHTML.indexOf(' id="') > elsare[iels].outerHTML.indexOf('<') && elsare[iels].outerHTML.indexOf(' id="') < elsare[iels].outerHTML.indexOf('>')) { relstrmsr=' ' + elsare[iels].outerHTML.split(' id="')[1].split('"')[0] + ' '; } if (relstrmsr.indexOf(' ' + commentary_array[jels].substring(1) + ' ') != -1) { elsare[iels].setAttribute('data-foundcommentary', commentary_array[eval(1 + eval('' + jels))]); elsare[iels].addEventListener("contextmenu", cmgdafmsr, false); exctheremsr=true; console.log('yes more, Array'); } } else { relstrmsr=''; if (elsare[iels].outerHTML.indexOf(commentary_array[jels]) == 1) { if (elsare[iels].outerHTML.indexOf(commentary_array[jels] + ' ') == 1) { elsare[iels].setAttribute('data-foundcommentary', commentary_array[eval(1 + eval('' + jels))]); elsare[iels].addEventListener("contextmenu", cmgdafmsr, false); exctheremsr=true; console.log('yes More, array'); } else if (elsare[iels].outerHTML.indexOf(commentary_array[jels] + '>') == 1) { elsare[iels].setAttribute('data-foundcommentary', commentary_array[eval(1 + eval('' + jels))]); elsare[iels].addEventListener("contextmenu", cmgdafmsr, false); exctheremsr=true; console.log('Yes more, array'); } } } } } } if (exctheremsr || (elsare[iels].outerHTML.indexOf(' data-foundcommentary=') > elsare[iels].outerHTML.indexOf('<') && elsare[iels].outerHTML.indexOf(' data-foundcommentary=') < elsare[iels].outerHTML.indexOf('>'))) { iels=iels; } else if (elsare[iels].outerHTML.indexOf(' data-commentary=') > elsare[iels].outerHTML.indexOf('<') && elsare[iels].outerHTML.indexOf(' data-commentary=') < elsare[iels].outerHTML.indexOf('>')) { elsare[iels].addEventListener("contextmenu", cmgdafmsr, false); } else { elsare[iels].addEventListener("contextmenu", cmfmsr, false); } } } function huhmsr() { document.getElementById('msrae').style.display='none'; document.getElementById('spansel').style.display='none'; } function checkmsr(iois) { var sfsg=false; if (iois != null) { var aconto = (iois.contentWindow || iois.contentDocument); //console.log(11); if (aconto != null) { //console.log(navigator.platform); if (iois.src.indexOf('localhost') != -1 && navigator.platform.indexOf("Mac") === 0) { sfsg=true; } if (!sfsg && iois.src.indexOf('localhost') != -1) { wo_ismsr.close(); //document.getElementById('macos').style.display='inline-block'; wmsrcd=true; } try { //if (iois.src.indexOf('/intranet_access_count.php') != -1) { console.log('aconto=' + aconto); } if (aconto.document) { aconto = aconto.document; } //if (iois.src.indexOf('/intranet_access_count.php') != -1) { icountmsr=(aconto.body.innerText || aconto.body.contentWindow || aconto.body.contentDocument); if (jcountmsr == 0) { jcountmsr=icountmsr; } else if (eval(icountmsr - jcountmsr) < 2) { connectionmsr=false; } console.log('icountmsr,jcountmsr=' + icountmsr + ',' + jcountmsr); } //console.log(1111); if (aconto.body != null) { //console.log(2); if (aconto.body.innerHTML.indexOf('>') != -1) { //console.log(3); if (iois.src.indexOf(':8888/') != -1) { //console.log(4); //if (document.URL.indexOf('via=parenthtml') != -1) { //console.log(5); if (aconto.body.innerHTML.toLowerCase().indexOf('not found') == -1) { wo_ismsr.close(); //document.getElementById('macos').style.display='inline-block'; wmsrcd=true; } } //} } } } catch(exxx) { console.log(exxx.message); //wo_ismsr.close(); //alert(exxx.message); //wmsrcd=true; } } } } function checkjmsr(iois) { var sfsg=false; if (iois != null) { var aconto = (iois.contentWindow || iois.contentDocument); console.log(11); if (aconto != null) { console.log(navigator.platform); try { if (iois.src.indexOf('/intranet_access_count.php') != -1) { console.log('aconto=' + aconto); } if (aconto.document) { aconto = aconto.document; } if (iois.src.indexOf('/intranet_access_count.php') != -1) { icountmsr=(aconto.body.innerText || aconto.body.contentWindow || aconto.body.contentDocument); if (jcountmsr == 0) { jcountmsr=icountmsr; } else if (eval(icountmsr - jcountmsr) < 2) { connectionmsr=false; } console.log('icountmsr,jcountmsr=' + icountmsr + ',' + jcountmsr); } console.log(1111); if (aconto.body != null) { console.log(2); if (aconto.body.innerHTML.indexOf('>') != -1) { console.log(3); if (iois.src.indexOf(':8888/') != -1) { console.log(4); //if (document.URL.indexOf('via=parenthtml') != -1) { console.log(5); if (aconto.body.innerHTML.toLowerCase().indexOf('not found') == -1) { wo_ismsr.close(); //document.getElementById('macos').style.display='inline-block'; wmsrcd=true; } } //} } } } catch(exxx) { console.log(exxx.message); //wo_ismsr.close(); //alert(exxx.message); //wmsrcd=true; } } } } function konlmsr() { document.getElementById('jfh').src='//www.rjmprogramming.com.au/intranet_access_count.php?rand=' + Math.floor(Math.random() * 198767543); setTimeout(locopencheck, 2500); setTimeout(huhmsr, 29000); } function jonlmsr() { wo_ismsr=window.open('HTTP://localhost:8888/macos_say_record.php?andsoonclose=y&docronwork=ls', 'ifh', 'top=50,left=50,width=500,height=500'); //'_blank', 'top=50,left=50,width=500,height=500'); setTimeout(konlmsr, 500); } function onlmsr() { if (document.body) { document.body.innerHTML+="💬"; setTimeout(jonlmsr, 1900); } else { setTimeout(onlmsr, 1000); } } setTimeout(onlmsr, 2000);