From 1b5626b47700ec63cae210e6894683a6a8c96568 Mon Sep 17 00:00:00 2001 From: Mike Rockwell Date: Thu, 24 Jul 2025 11:31:27 -0400 Subject: [PATCH] Add JavaScript auto scroll when opening the value block --- app.js | 8 ++++++++ index.html | 4 +++- 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 app.js diff --git a/app.js b/app.js new file mode 100644 index 0000000..77871be --- /dev/null +++ b/app.js @@ -0,0 +1,8 @@ +const valueBlock = document.getElementById("value-expanded"); + +document.querySelector('.value-block').addEventListener('toggle', function() { + if (this.open) { + // Code to execute when the details are opened + valueBlock.scrollIntoView({ behavior: "smooth" }); + } +}); diff --git a/index.html b/index.html index 83c8724..d1a4f48 100644 --- a/index.html +++ b/index.html @@ -47,7 +47,7 @@ MetaGamerScore
- + Value for Value @@ -76,6 +76,8 @@ + +