Browse Source

Update functions.php

pull/680/head
danpros 1 year ago
parent
commit
c33d3676d0
1 changed files with 7 additions and 1 deletions
  1. +7
    -1
      system/includes/functions.php

+ 7
- 1
system/includes/functions.php View File

@ -523,7 +523,13 @@ function get_posts($posts, $page = 1, $perpage = 0)
$load = <<<EOF
<script>
document.addEventListener("DOMContentLoaded", function() {
generateTOC('.post-{$post->date}');
if (document.getElementById('toc-wrapper.post-{$post->date}').parentNode.classList.contains('post-{$post->date}')) {
generateTOC('.post-{$post->date}');
} else {
document.getElementById('toc-wrapper.post-{$post->date}').parentNode.classList.add('post-{$post->date}');
generateTOC('.post-{$post->date}');
}
});
</script>
EOF;


Loading…
Cancel
Save