2019-10-08 14:58:17 +03:00
|
|
|
/*
|
|
|
|
* Hide the empty ToC in posts.
|
|
|
|
*
|
|
|
|
* © 2019 Cotes Chung
|
|
|
|
* MIT Licensed
|
|
|
|
*/
|
|
|
|
|
|
|
|
$(function() {
|
2019-11-24 19:19:03 +03:00
|
|
|
if ($("#post-wrap .post-content h1").length == 0
|
|
|
|
&& $("#post-wrap .post-content h2").length == 0
|
|
|
|
&& $("#post-wrap .post-content h3").length == 0
|
|
|
|
&& $("#post-wrap .post-content h4").length == 0
|
|
|
|
&& $("#post-wrap .post-content h5").length == 0) {
|
|
|
|
$("#toc-wrap").addClass("hidden");
|
2019-10-08 14:58:17 +03:00
|
|
|
}
|
|
|
|
});
|