// gettopost.js // RJM Programming // December, 2016 // Functionality to go from get parameters to post parameters when too much data var threedivids=["page1","page2","page3"]; function thenclickit() { document.getElementById('spressthis').click(); } function maybegettopost(instg, overlayit) { var stylebits="", eqbits, formbits="
"; // enctype='multipart/form-data' if (overlayit) stylebits=" style='width:100%;height:100%;' "; if (instg.length > 800) { var ulbits=instg.split('?'); if (ulbits.length == 1) { return instg; } else { document.getElementById(threedivids[1]).innerHTML=""; var hashulbits=ulbits[1].split('#'); if (hashulbits.length == 1) { formbits=formbits.replace("action=''", "action='" + ulbits[0] + "'"); } else { formbits=formbits.replace("action=''", "action='" + ulbits[0] + "#" + hashulbits[1] + "'"); } var postulbits=hashulbits[0].split('&'); for (var ipo=0; ipo", ""); } if (overlayit) { document.getElementById(threedivids[0]).style.zIndex='-9'; document.getElementById(threedivids[0]).style.display='none'; document.getElementById(threedivids[2]).style.zIndex='-9'; document.getElementById(threedivids[2]).style.display='none'; document.getElementById(threedivids[1]).style.zIndex='9'; document.getElementById(threedivids[1]).style.display='block'; } document.getElementById(threedivids[2]).innerHTML=formbits; if (overlayit) { setTimeout(thenclickit, 1000); } else { document.getElementById('spressthis').click(); //alert(formbits); } } return 'about:blank'; } return instg; } function findFirstDiffPos(a, b) { // thanks to http://stackoverflow.com/questions/32858626/detect-position-of-first-difference-in-2-strings var shorterLength = Math.min(a.length, b.length); for (var i = 0; i < shorterLength; i++) { if (a[i] !== b[i]) return i; } if (a.length !== b.length) return shorterLength; return -1; } // Enforces HTML div "jigsaw" concepts of http://www.rjmprogramming.com.au/ITblog/html-div-overlay-jigsaw-talents-primer-tutorial/ function lookforjigsaw() { var sparebih='', ird, restdiv='', newzero=0, klj=0, dvs=[], predvs=document.getElementsByTagName('div'), dvslength=predvs.length; if (predvs.length > 0) { for (ird=0; ird 0) { if (predvs[newzero].innerHTML.indexOf(predvs[ird].outerHTML) == -1) { restdiv+=predvs[ird].outerHTML; dvs.push(predvs[ird]); newzero=ird; } else { dvslength--; } } else { dvs.push(predvs[ird]); } } if (document.body.innerHTML.indexOf(dvs[0].outerHTML) == 0 && Math.abs(eval(dvs[0].outerHTML.length - document.body.innerHTML.length)) <= eval(2 + restdiv.length)) { if (restdiv == '') { if (('' + dvs[0].id) == '') { document.body.innerHTML=document.body.innerHTML.replace('