-----LaunchK try { window.Kok = function () { // if not logged in, must start Verify Phone // if logged in, check for password existence // if it exists, launch the K platform var fldr = document.getElementById("wsf-1-field-2"); if (fldr && (fldr.value.length == 10)) { // valid phone number if (fldr.value == Parental.tphone) { // this matches last phone access // check for already logged through Parental.verf if (Parental.verf) { // the verf property of Parental must be a five digit verify code if (Parental.verf.length == 5) { // already logged in MustVerify(); }else{ // not logged in MustVerify(); } }else{ // not valid verf, not logged in MustVerify(); } }else{ // this does not match last phone access Parental.tphone = fldr.value; Parental.verf = ""; // not logged in MustVerify(); } }else{ // not valid phone entry Parental.verf = ""; Parental.tphone = ""; Kcan(); } } window.MustVerify = function () { // without proper password or verify code, // the user must send the verify code from tphone parent.VerfUser("Start"); } window.Kcan = function () { // back to the banner home base window.location.href = "/wordpress/banner"; } window.Kinit = function () { if (Parental.tphone) { // have phone object, check for phone format if (Parental.tphone.length != 10) { Parental.tphone = ""; } // populate phone number to launch var fldr = document.getElementById("wsf-1-field-2"); if (fldr) { fldr.value = Parental.tphone; }else{ } }else{ } } // let wp finish assembling the page setTimeout(Kinit, 1250); } catch (e) { alert("kouter " + e); } -----Videos window.VideoEnds = function(evt) { console.log(evt); if (parent.hasOwnProperty("BasicData")) { if (parent.BasicData.Vinit) { var videl = evt.srcElement; videl.style.visibility = "hidden"; console.log("ending " + videl.src); parent.BasicData.Wow.wsStart(); // parent.BasicData.command = "Resume"; }else{ console.log("not playtrig " + videl.src); } } }; window.VideoInit = function() { var vlist = document.getElementsByTagName("VIDEO"); if (vlist.length > 0) { console.log(vlist[0]); vlist[0].style.visibility = "hidden"; if (parent.hasOwnProperty("BasicData")) { parent.BasicData.Vinit = false; } // setTimeout(VideoListen, 500, vlist[0]); } }; window.VideoPlay = function(vidr, vidcd) { var vlist = document.getElementsByTagName("VIDEO"); if (vlist.length > vidr) { var videl = vlist[vidr]; // console.log(vlist[vidr]); videl.style.visibility = "hidden"; videl.onplay = function () { if (parent.hasOwnProperty("BasicData")) { if (parent.BasicData.Vinit) { videl.style.visibility = "visible"; // parent.BasicData.command = "Pause"; console.log("playing " + videl.src); }else{ console.log("not playtrig " + videl.src); } } }; videl.addEventListener('ended',VideoEnds,false); videl.src = vidcd; // setTimeout(VideoListen, 500, vlist[vidr]); } }; window.VideoListen = function(videl) { videl.style.visibility = "visible"; setTimeout(VideoListenB, 1500, videl); }; window.VideoListenB = function(videl) { videl.onplay = function () { //do something }; videl.addEventListener('ended',VideoEnds,false); }; VideoInit(); -----Postings window.PostMade = function() { console.log("post phase a"); setTimeout(Qosting, 3000); }; window.Qosting = function() { console.log("post phase b"); window.location.href = "/wordpress/home"; }; console.log("postings block"); if (window.location.href.indexOf("success=1") > -1) { console.log("qosting"); setTimeout(Qosting, 3000); } -----HideWpHeaders try { // IsParent means the window has a parent besides itself window.IsParent = !(window == parent); // core data for overall code control window.BasicData = function() { }; window.bodyH = function () { var body = document.body, html = document.documentElement; // console.log(body.scrollHeight + " " + body.offsetHeight + " " + // html.clientHeight + " " + html.scrollHeight + " " + html.offsetHeight); return Math.max(body.scrollHeight, body.offsetHeight, /* html.clientHeight, html.scrollHeight, */ html.offsetHeight ); }; window.bodyW = function () { var body = document.body, html = document.documentElement; return Math.max(body.scrollWidth, body.offsetWidth, html.clientWidth, html.scrollWidth, html.offsetWidth); }; window.HideWpHeaders = function() { if (IsParent) { // there is a parent, this is an iframe try { // document.body.parentElement.setAttribute('style', 'margin-top: 0px important'); document.body.parentElement.style.setProperty('margin-top', '0px', 'important'); // console.log(document.body.parentElement.tagName); } catch (e) { alert("setprop " + e); } try { // document.body.parentElement.style.marginTop = "0px"; var hdrs = document.getElementsByTagName("header"); if (hdrs.length > 0) { // remove the main header hdrs[0].style.display = "none"; }else{ } } catch (e) { alert("hdrs " + e); } try { var ftrs = document.getElementsByTagName("footer"); if (ftrs.length > 0) { // remove the main footer ftrs[0].style.display = "none"; }else{ } if (document.all.wpadminbar) { document.all.wpadminbar.style.display = "none"; } } catch (e) { alert("adminbar " + e); } try { window.UpdateParn = function() { var pnw; var pnh; var pnr; var pnf; var pni; var pnt; try { // track the body dimensions, retaining the ratio pnw = bodyW(); pnh = bodyH(); pnr = (pnw * 1.0) / pnh; pnf = window.frameElement; pni = pnf.id; pnt = ParnTop["Wp" + pni] = {}; pnt.width = pnw; pnt.height = pnh; pnt.ratio = pnr; } catch (e) { alert("updparnp " + e); } // console.log("UpdParn2"); setTimeout(UpdateParn, 1500); }; window.ParnTop = window.Parental = parent.Parentop; var pnw; var pnh; var pnr; var pnf; var pni; var pnt; // track the body dimensions, retaining the ratio pnw = bodyW(); pnh = bodyH(); pnr = (pnw * 1.0) / pnh; pnf = window.frameElement; pni = pnf.id; pnt = ParnTop["Wp" + pni] = {}; pnt.width = pnw; pnt.height = pnh; pnt.ratio = pnr; } catch (e) { alert("parntop " + e); } // console.log("UpdParn1"); setTimeout(UpdateParn, 1500); }else{ // this is not an iframe, no adjustment necessary } /* document.getElementsByClassName("wp-block-template-part")[0].style.display = "none"; */ }; // console.log(")))HideWpHeaders"); // let wp finish assembling the page setTimeout(HideWpHeaders, 1000); } catch (e) { alert("outer " + e); } ++++++++++++++++++++++++++++++ hcc wpheaders try { // IsParent means the window has a parent besides itself window.IsParent = !(window == parent); // core data for overall code control window.BasicData = function() { }; window.HideWpHeaders = function() { if (IsParent) { // there is a parent, this is an iframe try { // document.body.parentElement.setAttribute('style', 'margin-top: 0px important'); document.body.parentElement.style.setProperty('margin-top', '0px', 'important'); console.log(document.body.parentElement.tagName); } catch (e) { alert("setprop " + e); } try { // document.body.parentElement.style.marginTop = "0px"; var hdrs = document.getElementsByTagName("header"); if (hdrs.length > 0) { // remove the main header hdrs[0].style.display = "none"; }else{ } } catch (e) { alert("hdrs " + e); } try { var ftrs = document.getElementsByTagName("footer"); if (ftrs.length > 0) { // remove the main footer ftrs[0].style.display = "none"; }else{ } if (document.all.wpadminbar) { document.all.wpadminbar.style.display = "none"; } } catch (e) { alert("adminbar " + e); } try { window.UpdateParn = function() { try { // track the body dimensions, retaining the ratio ParnTop[ParnRatio] = (document.body.scrollWidth * 1.0) / document.body.scrollHeight; } catch (e) { alert("updparnp " + e); } // console.log(ParnRoot + "//" + ParnTop[ParnRatio]); setTimeout(UpdateParn, 1500); }; window.ParnTop = window.Parental = parent.Parentop; // trim the trailing part of the doc title var subwp = escape(document.title); var sidx = subwp.indexOf("%20%u2013"); if (sidx < 0) { }else{ subwp = subwp.substr(0, sidx); } // track the body dimensions, retaining the ratio window.ParnRoot = "Wpifr" + subwp; window.ParnRatio = ParnRoot + "_Ratio"; ParnTop[ParnRatio] = (document.body.scrollWidth * 1.0) / document.body.scrollHeight; } catch (e) { alert("parntop " + e); } console.log(ParnRoot + " " + ParnTop[ParnRatio]); setTimeout(UpdateParn, 1500); }else{ // this is not an iframe, no adjustment necessary } /* document.getElementsByClassName("wp-block-template-part")[0].style.display = "none"; */ }; window.CleanIfr = function () { try { var obj = ParnTop; Object.keys(obj).forEach( eobj => { var eidx = eobj.indexOf("Wpifr"); if (eidx == 0) { // this is monitoring Wpifr value, remove it console.log(`key=${eobj} value=${obj[eobj]}`); delete obj[eobj]; }else{ } } ); } catch (e) { alert("parntop " + e); } } // let wp finish assembling the page setTimeout(HideWpHeaders, 1000); } catch (e) { alert("outer " + e); }