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

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

来自LLWiki
跳转到导航 跳转到搜索
第11行: 第11行:
ele.onclick = function() {
ele.onclick = function() {
table.querySelector( '.tabs-label' ).textContent = ele.textContent;
table.querySelector( '.tabs-label' ).textContent = ele.textContent;
table.querySelectorAll( 'td:nth-last-child(-n+2) > span' ).forEach(function(e) {
table.querySelectorAll( 'td[data-easy]' ).forEach(function(e) {
e.style.display = '';
e.textContent = e.dataset[ ele.textContent.toLowerCase() ] || '/';
});
table.querySelectorAll( 'td:nth-last-child(-n+2)' ).forEach(function(e) {
let level = e.querySelector( ':scope > span:nth-child(' + (i+1) + ')' );
level.style.display = 'initial';
e.dataset.sortValue = level.textContent;
});
});
};
};
第29行: 第24行:
.sif-song-table {
.sif-song-table {
text-align:center;
text-align:center;
}
.sif-song-table .tabs-dropdown {
width:auto !important;
}
}
.sif-song-table .tabs-content {
.sif-song-table .tabs-content {
第38行: 第36行:
.sif-song-table .tabs-dropdown li:last-child {
.sif-song-table .tabs-dropdown li:last-child {
border-radius:0 0 8px 8px;
border-radius:0 0 8px 8px;
}
.sif-song-table td:nth-last-child(-n+2) > span {
display:none;
}
}
/* </pre><includeonly> */
/* </pre><includeonly> */

2020年10月15日 (四) 23:22的版本

Template-info.png 小部件文档
这个文档是内联文档。

用于LoveLive!学园偶像祭歌曲列表

JavaScript脚本:

window.addEventListener('load', function() {
    var skin = mw.config.get('skin');
    document.querySelectorAll( '.sif-song-table' ).forEach(function(table) {
        if(skin == 'minerva') {
            let ele = table.querySelector('.tabs-content');
            ele.appendChild(ele.nextSibling);
        }
        table.querySelectorAll( '.tabs-dropdown li' ).forEach(function(ele, i) {
            ele.onclick = function() {
                table.querySelector( '.tabs-label' ).textContent = ele.textContent;
                table.querySelectorAll( 'td[data-easy]' ).forEach(function(e) {
                    e.textContent = e.dataset[ ele.textContent.toLowerCase() ] || '/';
                });
            };
        });
    });
});
//

CSS样式表:

 */
.sif-song-table {
	text-align:center;
}
.sif-song-table .tabs-dropdown {
	width:auto !important;
}
.sif-song-table .tabs-content {
	border-radius:0 0 8px 8px;
}
.sif-song-table .tabs-dropdown ul {
	padding:0;
}
.sif-song-table .tabs-dropdown li:last-child {
	border-radius:0 0 8px 8px;
}
/*