/* {{203-1654-23-45@11@en@*}} 203-1654-23-45@11@en@*
pali text
*/ /* 解析百科字符串 {{203-1654-23-45@11@en@*}} */ function note_init(input){ let output="
"; let arrInput = input.split("\n"); for(x in arrInput){ if(arrInput[x].slice(0,2)=="==" && arrInput[x].slice(-2)=="=="){ output += "
"; output += "
"; output += "

"; output += arrInput[x].slice(2,-2); output += ""; output += ""; output += ""; output += "

"; output += "
"; } else{ let row=arrInput[x]; row = row.replace(/\{\{/g,""); if(row.match("{") && row.match("}")){ row=row.replace("{",""); row=row.replace("}",""); } output+=row; } } output += "
"; return(output); } // function note_refresh_new(){ $("note").each(function(index,element){ let html=$(this).html(); let id=$(this).attr("id"); if(id==null || id==""){ id=com_guid(); $(this).attr("id",id); let info=$(this).attr("info"); if(info && info!=""){ $.get("../term/note.php", { id:id, info:info, }, function(data,status){ try{ let arrData=JSON.parse(data); let id=arrData.id; let strHtml = note_json_html(arrData); $("#"+id).html(strHtml); term_updata_translation(); } catch(e){ console.error(e); } } ); } } }); } /* id palitext tran ref */ function note_json_html(in_json){ let output=""; output += "
"+in_json.palitext+"
"; output += "
"+term_std_str_to_tran(in_json.tran)+"
"; output += "
"+in_json.ref+"
"; return(output); }