16,874
个编辑
LLWiki正在建设中,欢迎加入我们!
小 |
|||
const main = (data) => {
mw.sifdata = data[0];
const
mw.sifdata.map(ele => ele[key]).filter(ele => ele).sort()▼
optionsJa = buildOptions( 'j' ),▼
attr = ['s', 'p', 'c'],
diff = ['easy', 'normal', 'hard', 'expert', 'exran', 'master'],
convertTime = (t) => `${ Math.floor(t / 60) }:${ (t % 60).toString().padStart(2, 0) }`,
new OO.ui.MenuSectionOptionWidget({label: '原名'}), ...optionsJa,▼
.map(ele => new OO.ui.
const term = mw.sifdata.find(ele => ele.j == value || ele.c == value);
if (!term) { return; }
}).join( '' ) + '|条件=}}'
);
}
.append( $('<i>', {class: 'fas fa-backspace'}).click(() => { select.setValue(''); }) )▼
select = new OO.ui.ComboBoxInputWidget({ menu: {items: [
▲ new OO.ui.MenuSectionOptionWidget({label: '原名'}), ...optionsJa,
new OO.ui.MenuSectionOptionWidget({label: '中文名'}), ...optionsZh,
], width: '100%', filterFromInput: true, filterMode: 'substring'} }).on('change', change);
optionsJa.forEach(ele => { ele.$element.attr('lang', 'ja'); });
▲ return
}
selectSet = [1, 2, 3, 4].map( buildSelect );
$(() => { $('#mw-content-text .mw-parser-output').append([ ...selectSet, $output ]); });
},
init = () => {
|