From 9992e1122836167511a2112baaf817c45bb509e6 Mon Sep 17 00:00:00 2001 From: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Thu, 5 Dec 2019 23:11:52 +0800 Subject: [PATCH] Change the ToC hiding rule. Adapt to bootstrap-toc plugins. --- assets/js/_src/toc.js | 5 +---- assets/js/dist/toc.min.js | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/assets/js/_src/toc.js b/assets/js/_src/toc.js index 5e64906..2d3d765 100644 --- a/assets/js/_src/toc.js +++ b/assets/js/_src/toc.js @@ -7,10 +7,7 @@ $(function() { 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) { + && $("#post-wrap .post-content h2").length == 0) { $("#toc-wrap").addClass("hidden"); } }); \ No newline at end of file diff --git a/assets/js/dist/toc.min.js b/assets/js/dist/toc.min.js index d5dd257..56f77f2 100644 --- a/assets/js/dist/toc.min.js +++ b/assets/js/dist/toc.min.js @@ -1 +1 @@ -$(function(){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")}}); \ No newline at end of file +$(function(){if($("#post-wrap .post-content h1").length==0&&$("#post-wrap .post-content h2").length==0){$("#toc-wrap").addClass("hidden")}}); \ No newline at end of file