1
Fork 0

Hide all of ToCs when absent

This commit is contained in:
Jake Howard 2017-11-12 14:48:49 +00:00
parent fce036fea8
commit 16c6775156
Signed by: jake
GPG key ID: 57AFB45680EDD477

View file

@ -32,7 +32,7 @@ $(document).ready(function () {
$('#TableOfContents').each(function () {
var ele = $(this);
if (ele.find('a').length <= 3) {
ele.remove();
ele.parent().remove();
} else if (ele.children('ul').children('li').length === 1) {
ele.children('ul').replaceWith(ele.children('ul').children('li').children('ul'));
}