<div class="fc_3 xob_icon_cont">!_UniCode_?</div>
<script>
(function() {
// console.log("UniCode 15.5. ");
let qs="div.fc_3";
let dv=document.querySelector(qs);
let uniCodeNam="uniCode";
let uc_lst0=[129320,128512,128526,128558,128549,128565,129298,129301,129325,128519];
var create_uc_span = function(nd,uc_lst){
for (var uc of uc_lst) {
let sp=document.createElement("span");
sp.style="padding:0.3em; cursor:pointer;font-size:1.5em";
let s=l2b.i2c(uc); // String.fromCharCode
sp.appendChild(document.createTextNode(s));
sp.onclick=function(){
// l2b.msg_insert("[size=3]"+this.innerText+"[/size]");
l2b.msg_insert(this.innerText);
}
nd.parentNode.insertBefore(sp,nd);
} // uc
}
if (!dv) alert("UniCode - no querySelector: "+qs);
for (var tt2 of "!_neue_UniCode;Unicode Zeichen speichern".split(",")) {
let nd=dv.cloneNode(true);
let tt=tt2.split(";");
nd.innerText=tt[0].charAt(0)=="!" ? tt[0]: ("["+tt[0]+"]");
if (tt[1]) nd.title=tt[1];
dv.parentNode.insertBefore(nd,dv);
if ( tt[0].indexOf("neue_UniC")>0) {
let uniC_lst=l2b.loc.get2(uniCodeNam,uc_lst0);
create_uc_span(nd,uniC_lst);
nd.onclick=function() {
let s=prompt("neue Icons abspeichern: \n\noder '---' delete all\n",l2b.i2c(0x1F9E8));
if (s=="---") {
l2b.loc.remove(uniCodeNam);
}else if (s) {
let lst=[];
let high,low,i=0;
while( i < s.length){
let c=s.charCodeAt(i);
if (0xD800 <= c && c <= 0xDBFF) {
hi = c;
low = s.charCodeAt(i + 1);
if (isNaN(low)) {
throw 'High surrogate not followed by ' +
'low surrogate in "onclick convert2entity()"';
}
i++;
c=((hi - 0xD800) * 0x400) + (low - 0xDC00) + 0x10000;
lst.push(c);
}
i++;
} // while
// prompt("noch nicht fertig\n",lst.join(" "));
if (confirm("neu speichern? \n ")+lst.join(" ")) {
let uniC_lst=l2b.loc.get2(uniCodeNam,uc_lst0);
for (let l of lst) {
let i=uniC_lst.indexOf(l);
if (i >=0 ) uniC_lst.splice(i, 1);
}
l2b.loc.set2(uniCodeNam,lst.concat(uniC_lst));
create_uc_span(nd,lst);
}
}
} // click
let i70=document.getElementById("xob_icon_70");
if (i70) i70.title=i70.title.replace("Farben","Farben & Unicode-Icons ");
} // uniC
} // tt
dv.onclick=function(){
alert("Hilfe \n'!_neue_UniCode' erwartet als Eingabe Tastatur-Smileys "
+"\nunter Windows: Windowtaste + '.' \n"
+"die Liste der Smileys wird im localStore gespeichert.\n "
+"\n oder '---' zum loeschen der Liste");
}
})();
document.addEventListener('DOMContentLoaded', function(){
//
}); // domcontent
</script>