<html>
<head>
<title>Select Palette - RJM Programming - May, 2025</title>
<style>
#mysel {
width: 100%;
height: 100%;
font-color: transparent;
background-color: yellow !important;
z-index: -9;
}
</style>
<script type=text/javascript>
var linesofcontent=[];
var linesofbcss=[], stylebit='';
var xis=20, yis=10;
var woois=null, woodone=false;
var gtaval='', ista=false, xgtaval='', lastghuh='', lastnumlines=0;

function dotdotdotten() {
if (window.opener) {
document.body.innerHTML='<textarea placeholder="Add your next bit of content (where ~~ can be line feed)." id=myta style=width:100%;height:100%; data-done="n" onblur="this.setAttribute(' + "'data-done','y'" + ');">' + decodeURIComponent(('' + location.hash).replace(/^\#/g,'')).replace(/\<br\>/g, String.fromCharCode(10)) + '</textarea>';
} else {
addcontents(document.getElementById('mysel').title.replace(/\.\.\./g, '... ~~'));
document.getElementById('mysel').title=document.getElementById('mysel').title.replace(/\.\.\./g, '... ' + String.fromCharCode(10));
linesofcontent=[];
linesofbcss=[];
stylebit='';
//document.getElementById('mysel').readonly=true;
//document.getElementById('mysel').disabled=true;
}
}

function preaddcontents() {
addcontents('');
return false;
}

function bfta() {
var taval='';
if (woois) {
if (!woois.closed) {
if (woois.document.getElementById('myta').outerHTML.indexOf(' data-done="y"') != -1) {
taval=woois.document.getElementById('myta').value;
//alert('taval=' + taval);
linesofcontent=[];
ista=true;
addcontents(taval);
ista=false;
woois.close();
woois=null;
}
}
}
}

function ourprompt(theblurb, thedef) {
if (!woodone) {
woodone=true;
setInterval(bfta, 1000);
}
if (woois) {
if (!woois.closed) {
woois.close();
woois=null;
}
}
woois=window.open('./select_palette.html#' + encodeURIComponent(gtaval), '_blank', 'top=100,left=100,width=600,height=600');
return '';
}

function addcontents(inboc) {
var nboc='', seventeen="17", zero=0, numlines=1, one=1, grest='', ghuh='', wasfound=false, jnew=0;
if (!navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
zero="-60";
}
if (inboc == '') {
nboc=ourprompt('Add your next bit of content (where ~~ can be line feed).', '');
} else {
nboc=inboc;
if (!ista) { seventeen="12"; }
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
zero="80";
} else {
zero="-60";
}
}
if (!nboc) { nboc=''; }
if (nboc != ' ') {
var newlines=nboc.split('~~');
if (eval('' + newlines.length) == 1) {
newlines=inboc.split(String.fromCharCode(10));
} else {
ista=false;
}
if (ista) {
numlines=eval('' + newlines.length);
one=numlines;
//alert(seventeen + ' ... ' + one);
if (one == 1) { ista=false; }
}
gtaval='';
xgtaval='';
for (var inew=0; inew<newlines.length; inew++) {
linesofcontent.push(newlines[inew]);
if (seventeen == "17") {
if (gtaval == '' || (lastghuh != '' && lastghuh == gtaval) || (lastghuh != '' && lastghuh.replace(/\<br\>$/g, '') == gtaval)) {
if (gtaval != '' && numlines > lastnumlines && ista) {
numlines-=lastnumlines;
one=numlines;
wasfound=true;
jnew=inew;
}
gtaval=newlines[inew];
xgtaval=gtaval;
} else {
gtaval+='<br>' + newlines[inew];
xgtaval+="</text><text x='5%' y='" + eval(eval(1 + inew - jnew) * eval(90 / numlines)) + "%' xml:space='preserve'>" + newlines[inew];
}
}
}
//alert('gtaval=' + gtaval);
linesofbcss=[];
stylebit='<style> #mysel { background: ; } </style>';
xis=20;
yis=10;
for (var jnew=0; jnew<linesofcontent.length; jnew+=one) {
if (jnew == 0) {
if (ista) {
if (wasfound || (lastghuh != '' && gtaval.indexOf(lastghuh) == 0 && lastghuh != gtaval)) {
document.getElementById('dcont').innerHTML+="<br><br><br><svg xmlns='http://www.w3.org/2000/svg' width='" + eval(" + zero + " + eval('' + screen.width)) + "' height='" + eval(48 * numlines) + "' viewport='0 0 100 100' style='border-top-left-radius:35px;border-bottom-right-radius:35px;border-top-right-radius:35px;background-color:rgba(0,0,255,0.3);fill:black;font-family:Verdana;font-size:" + seventeen + "px;'><text x='5%' y='" + eval(90 / numlines) + "%' xml:space='preserve'>" + xgtaval.replace(/\<br\>/g, String.fromCharCode(10)) + "</text></svg>";
} else {
document.getElementById('dcont').innerHTML="<svg xmlns='http://www.w3.org/2000/svg' width='" + eval(" + zero + " + eval('' + screen.width)) + "' height='" + eval(48 * numlines) + "' viewport='0 0 100 100' style='border-top-left-radius:35px;border-bottom-right-radius:35px;border-top-right-radius:35px;background-color:rgba(0,0,255,0.3);fill:black;font-family:Verdana;font-size:" + seventeen + "px;'><text x='5%' y='" + eval(90 / numlines) + "%' xml:space='preserve'>" + xgtaval.replace(/\<br\>/g, String.fromCharCode(10)) + "</text></svg>";
}
//stylebit=stylebit.replace('; ', "url(\"data:image/svg+xml;base64," + window.btoa("<svg xmlns='http://www.w3.org/2000/svg' width='" + eval(" + zero + " + eval('' + screen.width)) + "' height='" + eval(48 * numlines) + "' viewport='0 0 100 100' style='border-radius:15px;background-color:rgba(0,0,255,0.3);fill:black;font-family:Verdana;font-size:" + seventeen + "px;'><text x='5%' y='60%' xml:space='preserve'>" + gtaval + "</text></svg>") + "\") no-repeat " + xis + "px " + yis + "px ; ");
if (wasfound) {
gtaval=lastghuh + gtaval;
if ((gtaval + '~~').indexOf('<br>~~') == -1) { gtaval+='<br>'; }
numlines+=lastnumlines;
//alert(numlines + ' ... ' + gtaval);
}
lastghuh=gtaval;
lastnumlines=numlines;
} else {
stylebit=stylebit.replace('; ', "url(\"data:image/svg+xml;base64," + window.btoa("<svg xmlns='http://www.w3.org/2000/svg' width='" + eval(" + zero + " + eval('' + screen.width)) + "' height='" + eval(48 * numlines) + "' viewport='0 0 100 100' style='border-radius:15px;background-color:rgba(0,0,255,0.3);fill:black;font-family:Verdana;font-size:" + seventeen + "px;'><text x='5%' y='60%' xml:space='preserve'>" + linesofcontent[jnew] + "</text></svg>") + "\") no-repeat " + xis + "px " + yis + "px ; ");
}
} else {
stylebit=stylebit.replace('; ', ",url(\"data:image/svg+xml;base64," + window.btoa("<svg xmlns='http://www.w3.org/2000/svg' width='" + eval(" + zero + " + eval('' + screen.width)) + "' height='" + eval(48 * numlines) + "' viewport='0 0 100 100' style='border-radius:15px;background-color:rgba(0,0,255,0.3);fill:black;font-family:Verdana;font-size:" + seventeen + "px;'><text x='5%' y='60%' xml:space='preserve'>" + linesofcontent[jnew] + "</text></svg>") + "\") no-repeat " + xis + "px " + yis + "px ; ");
}
yis+=50;
}
document.getElementById('dstyle').innerHTML+=stylebit;
}
return false;
}

</script>
</head>
<body onload="dotdotdotten();">
<div id=dcont onmousedown=" event.stopPropagation(); event.preventDefault(); return addcontents(''); " ontouchdown=" event.stopPropagation(); event.preventDefault(); return addcontents(''); ">
<select title='Select Palette - RJM Programming - May, 2025 ... ... Click to fill with your speech bubble feeling prose or poetry (eg. haiku).' id=mysel multiple></select>
</div>
<div id=dstyle></div>
</code>