// divceditin.js // Help out divceditin.html dynamic style definition // RJM Programming - December, 2022 var todoccwith=location.search.split('tod' + 'owith=')[1] ? decodeURIComponent(location.search.split('tod' + 'owith=')[1].split('&')[0]) : (document.head.innerHTML.split('tod' + 'owith=').length <= 1) ? "*" : decodeURIComponent(document.head.innerHTML.split('tod' + 'owith=')[1].split('&')[0].split('"')[0].split("'")[0].split("#")[0].split(">")[0]); var afyourster=location.search.split('af' + 'ter=')[1] ? decodeURIComponent(location.search.split('af' + 'ter=')[1].split('&')[0]) : (document.head.innerHTML.split('af' + 'ter=').length <= 1) ? "" : decodeURIComponent(document.head.innerHTML.split('af' + 'ter=')[1].split('&')[0].split('"')[0].split("'")[0].split("#")[0].split(">")[0]); var beyoursfore=location.search.split('bef' + 'ore=')[1] ? decodeURIComponent(location.search.split('bef' + 'ore=')[1].split('&')[0]) : (document.head.innerHTML.split('bef' + 'ore=').length <= 1) ? "" : decodeURIComponent(document.head.innerHTML.split('bef' + 'ore=')[1].split('&')[0].split('"')[0].split("'")[0].split("#")[0].split(">")[0]); var blyoursurb=location.search.split('bl' + 'urb=')[1] ? decodeURIComponent(location.search.split('bl' + 'urb=')[1].split('&')[0]) : (document.head.innerHTML.split('bl' + 'urb=').length <= 1) ? "/* CSS styling can go here via a click ... eg. border-radius: 50%; */" : decodeURIComponent(document.head.innerHTML.split('bl' + 'urb=')[1].split('&')[0].split('"')[0].split("'")[0].split("#")[0].split(">")[0]); var blyoururb=blyoursurb; if (blyoursurb.indexOf(' */') != -1 && blyoursurb.indexOf(' eg. ') != -1) { blyoururb=blyoursurb.replace(' */', ' } */').replace(' eg. ', ' eg. ' + ('' + todoccwith) + ' { '); } function supdocss() { docss(''); } if (typeof docss !== "function") { function docss(txt) { var documentcbody=document.body; var sparecc=''; if (afyourster.trim() != '') { if (document.getElementById(afyourster.trim())) { documentcbody=document.getElementById(afyourster.trim().replace('#','')); } else { afyourster=''; } } if (beyoursfore.trim() != '') { if (document.getElementById(beyoursfore.trim())) { documentcbody=document.getElementById(beyoursfore.trim().replace('#','')); } else { beyoursfore=''; } } if (todoccwith.trim() != '') { if (document.getElementById(todoccwith.trim().replace('#','')) && todoccwith.indexOf('#') == -1) { blyoururb=blyoururb.replace(' eg. ' + ('' + todoccwith) + ' { ', ' eg. #' + ('' + todoccwith) + ' { '); todoccwith=location.search.split('tod' + 'owith=')[1] ? ('#' + decodeURIComponent(location.search.split('tod' + 'owith=')[1].split('&')[0])) : (document.head.innerHTML.split('tod' + 'owith=').length <= 1) ? "*" : ('#' + decodeURIComponent(document.head.innerHTML.split('tod' + 'owith=')[1].split('&')[0].split('"')[0].split("'")[0].split("#")[0].split(">")[0])); } } if (!document.getElementById('dstyle') && !document.getElementById('mydiv')) { if (todoccwith.replace('*','') == '') { if (beyoursfore.trim() != '') { sparecc=documentcbody.innerHTML; documentcbody.innerHTML="
" + sparecc; } else { documentcbody.innerHTML+="
"; } document.body.innerHTML+=""; } else { if (beyoursfore.trim() != '') { sparecc=documentcbody.innerHTML; documentcbody.innerHTML="
" + sparecc; } else { documentcbody.innerHTML+="
"; } } } else if (!document.getElementById('mystyle')) { document.body.innerHTML+=""; } if (txt.trim() != '') { if (txt.trim().indexOf('{') == -1) { document.getElementById('dstyle').innerHTML+=(' ','') + ' } '; } else { document.getElementById('dstyle').innerHTML+=' ','') + ' '; } } }; } function btaf() { if (document.body.outerHTML.split('>')[0].indexOf('doc' + 'ss(') == -1) { setTimeout(supdocss, 2000); } } setTimeout(btaf, 500);