metanohi-misc-subsites/subsites/projects/jap/kanaverter/bak/t.txt

30 lines
535 B
Plaintext
Raw Normal View History

2011-08-02 19:57:57 +02:00
function convert_value(str,from,to) {
strlen=str.length
cstart=0
ftxt=""
for (i=0;i<strlen;i++) {
clen=i-cstart+1
ctxt=str.substr(cstart,clen)
cctxt=str.substr(cstart+1,1)
maybe=false
for (ii=0;ii<rhiradbl;ii++) {
crhiradb=rhiradb[ii]
if (crhiradb==ctxt) {
ftxt+="&#12"+r_hiradb[ctxt]+";"
cstart=i+1
maybe=true
}
else if (crhiradb.substr(0,clen)==ctxt) {
maybe=true
}
}
if (!maybe) {
document.title=ctxt
//ftxt+=cctxt
cstart=i
}
}
//if (strlen>cstart) ftxt+=ctxt
ftxt=html_entity_decode(ftxt)
return ftxt
}