LLWiki正在建设中,欢迎加入我们!
“Widget:年表標籤/篩選”的版本间差异
跳转到导航
跳转到搜索
小 标签:移动版网页编辑 移动版编辑 |
小 (// 使用Wikiplus小工具快速编辑) 标签:移动版网页编辑 移动版编辑 |
||
第8行: | 第8行: | ||
document.querySelectorAll('#mw-content-text dl').forEach(function(parent) { |
document.querySelectorAll('#mw-content-text dl').forEach(function(parent) { |
||
var child = parent.querySelector('dd > :not(.mw-collapsed)'); |
var child = parent.querySelector('dd > :not(.mw-collapsed)'); |
||
parent.style.display = child ? '' : 'none'; |
|||
parent.style.display = ''; |
|||
else |
|||
parent.style.display = 'none'; |
|||
}); |
}); |
||
}, 50); |
}, 50); |
2020年9月12日 (六) 06:45的版本
JavaScript脚本:
window.addEventListener('load', function() {
document.querySelectorAll('.filter').forEach(function(ele) {
ele.addEventListener('click', function() {
setTimeout(function() {
document.querySelectorAll('#mw-content-text dl').forEach(function(parent) {
var child = parent.querySelector('dd > :not(.mw-collapsed)');
parent.style.display = child ? '' : 'none';
});
}, 50);
});
});
});
//