无编辑摘要
imported>=海豚= 无编辑摘要 |
imported>=海豚= 无编辑摘要 |
||
| (未显示同一用户的9个中间版本) | |||
| 第3行: | 第3行: | ||
window.newtrad2simcore = function newtrad2simcore(str){ | window.newtrad2simcore = function newtrad2simcore(str){ | ||
var zh2hansTable={ | var zh2hansTable={ | ||
/*来自媒体维基*/ | |||
"`㐷":"@傌", | "`㐷":"@傌", | ||
"`㐹":"@㑶", | "`㐹":"@㑶", | ||
| 第9,483行: | 第9,484行: | ||
"`,并力讨":"@,并力討", | "`,并力讨":"@,并力討", | ||
"`,个中":"@,箇中", | "`,个中":"@,箇中", | ||
/*来自萌娘百科*/ | |||
"`里番":"@裡番", | |||
"`希特拉":"@希特拉", | |||
"`希特勒":"@希特勒", | |||
"`戴安娜":"@戴安娜", | |||
"`狄安娜":"@狄安娜", | |||
"`劳拉":"@勞拉", | |||
}; | }; | ||
str=str.replace(/([^\u0000-\u1f00])/g,"`$1"); | str=str.replace(/([^\u0000-\u1f00])/g,"`$1"); | ||
str=str.replace(/`[^\u0000-\u1f00]/g, function repTable(s){return (zh2hansTable[s] || s);}); | str=str.replace(/`[^\u0000-\u1f00]/g, function repTable(s){return (zh2hansTable[s] || s);}); | ||
str=str.replace(/[@`]([^\u0000-\u1f00])/g,"$1"); | str=str.replace(/[@`]([^\u0000-\u1f00])/g,"$1"); | ||
str=str .replace(/\<gallery>.*\<\/gallery>/g,"`$1"); | |||
return str; | return str; | ||
}; | }; | ||