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

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

跳转到导航 跳转到搜索
删除783字节 、​ 2020年11月27日 (五) 06:12
无编辑摘要
标签移动版网页编辑 移动版编辑
<noinclude>{{doc|content=用于[[LoveLive!学园偶像祭歌曲列表]]。}}[[category:混合小部件]]</noinclude><includeonly><!--{if !isset($wgWidgetSifSongTable) || !$wgWidgetSifSongTable}--><!--{assign var="wgWidgetSifSongTable" value=true scope="global"}--><script defer src='/zh?title=</includeonly><noinclude><p>JavaScript脚本:[[</noinclude>User:Bhsd/widget/sif-song-table.js<noinclude>]]</p></noinclude><includeonly>&action=raw&ctype=text/javascript'></script><style>
//</includeonly>JavaScript脚本:<pre lang="js">
window.addEventListener('load', function() {
const 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) {
var attr = ele.textContent.toLowerCase().replace('-', '');
if(table.querySelector('td[data-' + attr + ']') !== null) {
ele.onclick = function() {
table.querySelector( '.tabs-label' ).textContent = ele.textContent;
table.querySelectorAll( 'td[data-easy]' ).forEach(function(e) {
e.textContent = e.dataset[attr] || '/';
});
};
}
else { ele.remove(); }
});
});
});
//</pre>
<includeonly>
</script><style>
/* </includeonly>CSS样式表:<pre lang="css"> */
.sif-song-table {
16,874

个编辑

导航菜单