Any tips appreciated, thanks!
I don’t think you’d really be “editing” any existing JS, just adding some of your own.
The html, body code just scrolls to the metadata instead of leaving you where you were when you pressed the button.
You can see this in action at https://www.indianadisabilityhistory.org/items/show/277#
<!-- Items metadata -->
<?php echo all_element_texts('item'); ?>
scrollTop: $('.all-metadata').offset().top}, 500);