MediaWiki:Common.js: различия между версиями
Shihov (обсуждение | вклад) Нет описания правки |
Shihov (обсуждение | вклад) Нет описания правки |
||
| Строка 132: | Строка 132: | ||
} | } | ||
}); | }); | ||
} | |||
}); | |||
document.addEventListener("DOMContentLoaded", function() { | |||
var sectionHeader = document.getElementById("section-header"); | |||
var sectionList = document.getElementById("sections-list"); | |||
// Проверяем, есть ли элементы <li> внутри <ul> | |||
if (sectionList && sectionList.children.length === 0) { | |||
sectionHeader.style.display = "none"; | |||
} | } | ||
}); | }); | ||