From bf9f47e7c5884aa6d501bf5a54dc6492d82ee2d9 Mon Sep 17 00:00:00 2001 From: gravel Date: Wed, 20 Dec 2023 18:18:20 +0000 Subject: [PATCH] feat: open room modal with id prefix --- output/main.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/output/main.js b/output/main.js index 2d45e13..ef7dd7d 100644 --- a/output/main.js +++ b/output/main.js @@ -97,12 +97,15 @@ function reactToURLParameters() { return; } - const communityID = hash; - const row = dom.community_row(communityID); + const communityIDPrefix = hash; + const row = dom.community_row(communityIDPrefix, true); if (row == null || !(row instanceof HTMLTableRowElement)) { return; } + const communityID = dom.row_info(row).identifier; + if (communityID == null) { throw new Error("Unreachable"); } + // manual scrolling to prevent jumping after every modal open row.scrollIntoView({