feat: 成语歇后语字典
This commit is contained in:
parent
fb28ceff4b
commit
8b1519ab97
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,28 @@
|
|||
// powerd by hanzi-writer v2.2.2
|
||||
const idiom = require('./writer');
|
||||
|
||||
|
||||
function main (cnchar) {
|
||||
if (cnchar.plugins.indexOf('idiom') !== -1) {
|
||||
return;
|
||||
}
|
||||
cnchar.plugins.push('idiom');
|
||||
cnchar.idiom = idiom;
|
||||
}
|
||||
|
||||
function init (cnchar) {
|
||||
if (typeof window === 'object') {
|
||||
window.CncharIdiom = idiom;
|
||||
}
|
||||
if (typeof window === 'object' && window.CnChar) {
|
||||
main(window.CnChar);
|
||||
} else if (typeof cnchar !== 'undefined') {
|
||||
main(cnchar);
|
||||
}
|
||||
}
|
||||
|
||||
idiom.init = init;
|
||||
|
||||
init();
|
||||
|
||||
module.exports = idiom;
|
|
@ -0,0 +1,29 @@
|
|||
// powerd by hanzi-writer v2.2.2
|
||||
const draw = require('./writer');
|
||||
|
||||
|
||||
function main (cnchar) {
|
||||
if (cnchar.plugins.indexOf('draw') !== -1) {
|
||||
return;
|
||||
}
|
||||
cnchar.plugins.push('draw');
|
||||
cnchar.draw = draw;
|
||||
}
|
||||
|
||||
function init (cnchar) {
|
||||
if (typeof window === 'object') {
|
||||
window.CncharIdiom = draw;
|
||||
window.CncharIdiom = draw;
|
||||
}
|
||||
if (typeof window === 'object' && window.CnChar) {
|
||||
main(window.CnChar);
|
||||
} else if (typeof cnchar !== 'undefined') {
|
||||
main(cnchar);
|
||||
}
|
||||
}
|
||||
|
||||
draw.init = init;
|
||||
|
||||
init();
|
||||
|
||||
module.exports = draw;
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue