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);
});
});
});
//