LLWiki正在建设中,欢迎加入我们

“Widget:As-song”的版本间差异

跳转到导航 跳转到搜索
document.querySelectorAll( '.as-song-container' ).forEach(function(ele) {
var select = document.createElement('select'),
nodeList = ele.querySelectorAll('.as-song');,
optionArray = [];
ele.insertBefore(select, ele.firstChild);
select.lang = 'ja';
selectnodeList.dataset.oldIndexforEach(function(table, =i) 0;{
var option = new Option(table.querySelector('big').textContent, i);
nodeList[0].style.display = 'table';
nodeList optionArray.forEachpush(function(tableoption) {;
});
var option = new Option(table.querySelector('big').textContent);
optionArray = optionArray.sort(function(a, b) {
return a.text <= b.text ? -1 : 1;
});
optionArray.forEach(function(option) {
select.add(option);
});
select.dataset.oldIndex = optionArray[0].value;
nodeList[0select.dataset.oldIndex].style.display = 'table';
select.onchange = function() {
nodeList[select.dataset.oldIndex].style.display = 'none';
nodeList[select.selectedIndex]dataset.style.displayoldIndex = 'table'optionArray[select.selectedIndex].value;
nodeList[select.dataset.oldIndex].style.display = select.selectedIndex'table';
};
});