// wajax.js // Ajax functionality for onmouseover event specifics at http://www.rjmprogramming.com.au/wordpress ... contextual advice // RJM Programming // Robert Metcalfe // November 2014 // Mobile devices use ontouchstart and ontouchend logic // Non-Mobile devices use onmouseover and onmouseout logic var hrsel = ""; var hrdivid = ""; var zhr = null; var zok = 1; var bpost = 0; var mtimer = null; var mdownis = false; var mfunction = null; var tickcnt = 0; var wua = navigator.userAgent; var wisiPad = /iPad/i.test(wua) || /iPhone OS 3_1_2/i.test(wua) || /Android/i.test(wua) || /iPhone OS 3_2_2/i.test(wua); var wisTouch = /touch/i.test(wua) || /Touch/i.test(wua); var wadvice = 'If contextual help is available for a feature (that you long touch on) of this webpage a new green bordered webpage part will open and on clicking in this and answering Y you can read and interact with a relevant Blog Posting regarding this. To remove (or restore) context help access the All Posts menu Toggle Context Help Mode submenu, as required.'; var cpost = ""; function dowhos() { if (document.getElementById('whos').innerHTML == '?') { document.getElementById('whos').innerHTML='admin'; setTimeout(dowhos, 9000); } else if (document.getElementById('whos').innerHTML == 'admin') { document.getElementById('whos').innerHTML='admin, But we seem to be lacking that using nothing more than an array schtick you go on and on and on and on about ...'; setTimeout(dowhos, 9000); } else if (document.getElementById('whos').innerHTML.indexOf('admin,') != -1 && document.getElementById('whos').innerHTML.indexOf('glad you') == -1) { var dwhuh="admin, But we seem to be lacking that using nothing more than an array schtick you go on and on and on and on and on and on and on and on about ...
Well, glad you asked ... take a look at var ans=['8.:Oxygen','6.:Carbon','1.:Hydrogen','7.:Nitrogen','20.:Calcium','15.:Phosphorus','19.:Potassium','16.:Sulphur','11.17:Sodium.Chlorine','17.11:Chlorine.Sodium','12.:Magnesium']; "; dwhuh+=" as the array lesson today ... why the . delimiter? ... the user is presented with element percentages of the body as clues and yet you can see there that Sodium and Chlorine both have a value of 0.2% ... so, what to do? ... legitimize a . as delimiter everywhere and allow for either answer when getting to that choice ... again, just an array, but complex delimitation ... endeth of thoueth lessoneth."; document.getElementById('whos').innerHTML=dwhuh; } } function getSws(evt) { var ourid="0", oids, oidss; cpost = ""; if (evt.target.id) { ourid=evt.target.id; cpost=document.getElementById(ourid).value; } else if (evt.id) { ourid=evt.id; cpost=document.getElementById(ourid).value; } if (cpost.indexOf("?p=") != -1 && cpost.indexOf("/wordpress") != -1) { oids=cpost.split("?p="); oidss=oids[1].split("&"); bpost = eval(oidss[0]); cpost=""; } else { bpost = 99999; } if ((wisiPad || wisTouch)) { if (mtimer) clearInterval(mtimer); tickcnt = 0; mtimer = setInterval(mchecker, 1000); } else { setTimeout(xget, 8000); } } function getVisualSynopsis(evt) { bpost = 17510; if ((wisiPad || wisTouch)) { if (mtimer) clearInterval(mtimer); tickcnt = 0; mtimer = setInterval(mchecker, 1000); } else { setTimeout(xget, 8000); } } function getAlphabeticalSearch(evt) { bpost = 16749; if ((wisiPad || wisTouch)) { if (mtimer) clearInterval(mtimer); tickcnt = 0; mtimer = setInterval(mchecker, 1000); } else { setTimeout(xget, 8000); } } function getHighlightedSearch(evt) { bpost = 16598; if ((wisiPad || wisTouch)) { if (mtimer) clearInterval(mtimer); tickcnt = 0; mtimer = setInterval(mchecker, 1000); } else { setTimeout(xget, 8000); } } function getBytheby(evt) { bpost = 11891; if ((wisiPad || wisTouch)) { if (mtimer) clearInterval(mtimer); tickcnt = 0; mtimer = setInterval(mchecker, 1000); } else { setTimeout(xget, 8000); } } function getHrs(evt) { bpost = 11666; if ((wisiPad || wisTouch)) { if (mtimer) clearInterval(mtimer); tickcnt = 0; mtimer = setInterval(mchecker, 1000); } else { setTimeout(xget, 8000); } } function getPostedOn(evt) { bpost = 11444; if ((wisiPad || wisTouch)) { if (mtimer) clearInterval(mtimer); tickcnt = 0; mtimer = setInterval(mchecker, 1000); } else { setTimeout(xget, 8000); } } function getBodyBorder(evt) { bpost = 13953; //; if ((wisiPad || wisTouch)) { if (mtimer) clearInterval(mtimer); tickcnt = 0; mtimer = setInterval(mchecker, 1000); } else { setTimeout(xget, 8000); } } function getSVG(evt) { bpost = 10920; if ((wisiPad || wisTouch)) { if (mtimer) clearInterval(mtimer); tickcnt = 0; mtimer = setInterval(mchecker, 1000); } else { setTimeout(xget, 8000); } } function getBlockquote(evt) { bpost = 11408; if ((wisiPad || wisTouch)) { if (mtimer) clearInterval(mtimer); tickcnt = 0; mtimer = setInterval(mchecker, 1000); } else { setTimeout(xget, 4000); } } function getNoclass(evt) { bpost = 11421; if ((wisiPad || wisTouch)) { if (mtimer) clearInterval(mtimer); tickcnt = 0; mtimer = setInterval(mchecker, 1000); } else { setTimeout(xget, 4000); } } function getCode(evt) { bpost = 10939; if ((wisiPad || wisTouch)) { if (mtimer) clearInterval(mtimer); tickcnt = 0; mtimer = setInterval(mchecker, 1000); } else { setTimeout(xget, 4000); } } function getRpnow(evt) { bpost = 10985; if ((wisiPad || wisTouch)) { if (mtimer) clearInterval(mtimer); tickcnt = 0; mtimer = setInterval(mchecker, 1000); } else { setTimeout(xget, 4000); } } function getDownloadMode(evt) { bpost = 12156; if ((wisiPad || wisTouch)) { if (mtimer) clearInterval(mtimer); tickcnt = 0; mtimer = setInterval(mchecker, 1000); } else { setTimeout(xget, 4000); } } function getContextHelpMode(evt) { bpost = 12220; if ((wisiPad || wisTouch)) { if (mtimer) clearInterval(mtimer); tickcnt = 0; mtimer = setInterval(mchecker, 1000); } else { setTimeout(xget, 4000); } } function clickaid(aidis) { var huha=document.getElementById('mywta'); if (huha != null) { huha.href = document.getElementById(aidis).href; } document.getElementById(aidis).click(); } function winit() { var opostedon = null; var clname = ''; var hdivids; var allPs; zhr = null; zok = 1; if ((wisiPad || wisTouch) || 1 == 1) { var mybased = document.getElementById('site-description'); if (mybased.innerHTML.indexOf("Long ") == -1) { if ((wisiPad || wisTouch)) { mybased.innerHTML = mybased.innerHTML.replace(")", ")
Long touch help available."); } else { mybased.innerHTML = mybased.innerHTML.replace(")", ")
Long hover help available."); } } } if (1 == 1) { if (navigator.userAgent.toLowerCase().indexOf("ie") != (0 - 1)) { allPs = document.getElementsByTagName('img'); } else { allPs= document.getElementsByClassName('iiconlist'); } for (var j=0; j < allPs.length; j++) { if (allPs[j].src.indexOf("transparent.png") != -1) { if ((wisiPad || wisTouch)) { allPs[j].ontouchstart = getRpnow; allPs[j].ontouchend = yehBut; } else { allPs[j].onmouseover = getRpnow; // 10985 if (allPs[j].title.indexOf(" ...") == -1) { allPs[j].title = allPs[j].title + " ... welcome to the long hover functionality that shows Blog Post regarding Recent Post images"; } allPs[j].onmouseout = yehBut; } } } } if (1 == 1) { if (navigator.userAgent.toLowerCase().indexOf("ie") != (0 - 1)) { allPs = document.getElementsByTagName('hr'); } else { allPs= document.getElementsByTagName('hr'); } for (var j=0; j < allPs.length; j++) { if ((wisiPad || wisTouch)) { allPs[j].ontouchstart = getHrs; allPs[j].ontouchend = yehBut; } else { allPs[j].onmouseover = getHrs; // 11666 if (allPs[j].title.indexOf(" ...") == -1) { allPs[j].title = allPs[j].title + " ... welcome to the long hover functionality that shows Blog Post regarding Horizontal Rules"; } allPs[j].onmouseout = yehBut; } } } if (navigator.userAgent.toLowerCase().indexOf("ie") != (0 - 1)) { allPs = document.getElementsByTagName('ul'); } else { allPs= document.getElementsByTagName('ul'); } for (var j=1; j < allPs.length; j++) { clname = allPs[j].classname; if (typeof clname == "undefined") { if (allPs[j].innerHTML.indexOf("aone") != -1) { clname = " "; } else { clname = ""; } } if (clname == null) clname = ""; if (clname.indexOf("iconlist") != -1) clname = "iconlist"; if (clname.indexOf("noclass") != -1) clname = ""; if (clname == "") { if ((wisiPad || wisTouch)) { allPs[j].ontouchstart = getNoclass; allPs[j].ontouchend = yehBut; } else { allPs[j].onmouseover = getNoclass; // 11421 if (allPs[j].title.indexOf(" ...") == -1) { allPs[j].title = allPs[j].title + " ... welcome to the long hover functionality that shows Blog Post regarding Ul/Li Tag CSS"; } allPs[j].onmouseout = yehBut; } } } if (navigator.userAgent.toLowerCase().indexOf("ie") != (0 - 1)) { allPs = document.getElementsByTagName('blockquote'); } else { allPs= document.getElementsByTagName('blockquote'); } for (var j=0; j < allPs.length; j++) { if ((wisiPad || wisTouch)) { allPs[j].ontouchstart = getBlockquote; allPs[j].ontouchend = yehBut; } else { allPs[j].onmouseover = getBlockquote; // 11408 if (allPs[j].title.indexOf(" ...") == -1) { allPs[j].title = allPs[j].title + " ... welcome to the long hover functionality that shows Blog Post regarding Blockquote Tag CSS"; } allPs[j].onmouseout = yehBut; } } if (navigator.userAgent.toLowerCase().indexOf("ie") != (0 - 1)) { allPs = document.getElementsByTagName('code'); } else { allPs= document.getElementsByTagName('code'); } for (var j=0; j < allPs.length; j++) { if ((wisiPad || wisTouch)) { allPs[j].ontouchstart = getCode; allPs[j].ontouchend = yehBut; } else { allPs[j].onmouseover = getCode; // 10939 if (allPs[j].title.indexOf(" ...") == -1) { allPs[j].title = allPs[j].title + " ... welcome to the long hover functionality that shows Blog Post regarding Code Tag CSS"; } allPs[j].onmouseout = yehBut; } } if (navigator.userAgent.toLowerCase().indexOf("ie") != (0 - 1)) { allPs = document.getElementsByTagName('img'); } else { allPs= document.getElementsByTagName('img'); } for (var j=0; j < allPs.length; j++) { if (allPs[j].id == "mytopimage") { if ((wisiPad || wisTouch)) { allPs[j].ontouchstart = getSVG; allPs[j].ontouchend = yehBut; } else { allPs[j].onmouseover = getSVG; // 10920 if (allPs[j].title.indexOf(" ...") == -1) { allPs[j].title = allPs[j].title + " ... welcome to the long hover functionality that shows Blog Post regarding SVG Mask"; } allPs[j].onmouseout = yehBut; } } } if (navigator.userAgent.toLowerCase().indexOf("ie") != (0 - 1)) { allPs = document.getElementsByTagName('a'); } else { allPs= document.getElementsByTagName('a'); } for (var j=0; j < allPs.length; j++) { if (allPs[j].id == "ahomeis") { if ((wisiPad || wisTouch)) { allPs[j].ontouchstart = getEmboss; allPs[j].ontouchend = yehBut; } else { allPs[j].onmouseover = getEmboss; // 10783 if (allPs[j].title.indexOf(" ...") == -1) { allPs[j].title = allPs[j].title + " ... welcome to the long hover functionality that shows Blog Post regarding 3D Embossed Text"; } allPs[j].onmouseout = yehBut; } } } hrsel = ""; if (navigator.userAgent.toLowerCase().indexOf("ie") != (0 - 1)) { allPs = document.getElementsByTagName('div'); } else { allPs= document.getElementsByTagName('div'); } for (var j=0; j < allPs.length; j++) { hdivid = allPs[j].id; if (typeof hdivid == "undefined") { hdivid = ""; } else { if (hdivid.indexOf("post-") != -1) { hdivids = (hdivid.substring(hdivid.indexOf("post-")) + " ").split(" "); hdivid = hdivids[0]; hdivids = allPs[j].innerHTML.split(' class="entry-title">'); if (hdivids.length > 1) { clname = ("~" + hdivids[1]).replace('~<',' ').replace('~',''); hdivids = clname.split("<"); if (hdivid != "" && hdivids[0] != "") { if (hdivids[0].indexOf(">") != -1) { clname = hdivids[0]; hdivids = clname.split(">"); hdivids[0] = hdivids[hdivids.length - 1]; if ((wisiPad || wisTouch)) { wisiPad = wisiPad; allPs[j].innerHTML = newblogmap(allPs[j].innerHTML, 0); // added in 22/5/2015 map to new blog with permalink /%postname%/ } else { allPs[j].innerHTML = newblogmap(allPs[j].innerHTML, 0); // map to new blog with permalink /%postname%/ } } if (hrsel.length == 0) { hrsel = "
"; } else if (hrsel.indexOf(hdivids[0]) == -1) { hrsel = hrsel.replace("", ""); } } } } } if (allPs[j].id == "access") { if ((wisiPad || wisTouch)) { allPs[j].ontouchstart = getGradient; allPs[j].ontouchend = yehBut; } else { allPs[j].onmouseover = getGradient; // 10640 if (allPs[j].title.indexOf(" ...") == -1) { allPs[j].title = allPs[j].title + " ... welcome to the long hover functionality that shows Blog Post regarding CSS3 Gradient"; } allPs[j].onmouseout = yehBut; } } } if (navigator.userAgent.toLowerCase().indexOf("ie") != (0 - 1)) { allPs = document.getElementsByTagName('p'); } else { allPs= document.getElementsByTagName('p'); } for (var j=0; j < allPs.length; j++) { hdivid = allPs[j].id; if (typeof hdivid == "undefined") { hdivid = ""; } else { hdivids = allPs[j].innerHTML.split(">"); if (hdivids.length > 1) { clname = ("~" + hdivids[1]).replace('~<',' ').replace('~',''); hdivids = clname.split("<"); if (hdivids[0].indexOf(">") != -1) { clname = hdivids[0]; hdivids = clname.split(">"); hdivids[0] = hdivids[hdivids.length - 1]; if ((wisiPad || wisTouch)) { wisiPad = wisiPad; } else { allPs[j].innerHTML = newblogmap(allPs[j].innerHTML, 0); // map to new blog with permalink /%postname%/ } } if ((hrsel + "*").indexOf("
"; } else if (hdivids[0].substring(0,1) >= "A" && hdivids[0].substring(0,1) <= "Z" && hrsel.indexOf(hdivids[0]) == -1) { hrsel = hrsel.replace("
"; } else if (hdivids[0].substring(0,1) >= "A" && hdivids[0].substring(0,1) <= "Z" && hrsel.indexOf(hdivids[0]) == -1) { hrsel = hrsel.replace("", ""); } } } } } } if (hrsel.indexOf("