diff --git a/themes/pr0booru/script.js b/themes/pr0booru/script.js index ef982ffa9..683345cf2 100644 --- a/themes/pr0booru/script.js +++ b/themes/pr0booru/script.js @@ -158,6 +158,15 @@ window.addEventListener('load', function () { ; } } + + infoSection = document.getElementsByClassName("image_info form")[0].parentNode.parentNode.parentNode; + sid = infoSection.attributes.id.nodeValue; + myh3 = document.createElement('h3'); + myh3.className = "shm-toggler"; + myh3.dataset.toggleSel = '#' + sid; + myh3.textContent = 'HIDE'; + infoSection.insertBefore(myh3, infoSection.firstChild); + }); // prevent rating view switcher form being submitted if no checkboxes are checked diff --git a/themes/pr0booru/view.theme.php b/themes/pr0booru/view.theme.php index 948126d21..607dd66f4 100644 --- a/themes/pr0booru/view.theme.php +++ b/themes/pr0booru/view.theme.php @@ -12,7 +12,7 @@ public function display_page(Image $image, $editor_parts): void $page->set_heading(html_escape($image->get_tag_list())); $page->add_block(new Block("Navigation", $this->build_navigation($image), "left", 0)); $page->add_block(new Block("Statistics", $this->build_stats($image), "left", 15)); - $page->add_block(new Block(null, $this->build_info($image, $editor_parts), "main", 10)); + $page->add_block(new Block(null, $this->build_info($image, $editor_parts), "main", 10, "info-edit-section")); $page->add_block(new Block(null, $this->build_pin($image), "main", 11)); }