From 78ebe7e6ba77463f6dfd6532d17f2829c17c71b7 Mon Sep 17 00:00:00 2001 From: Richard Bergsma Date: Thu, 6 Nov 2025 13:46:41 +0100 Subject: [PATCH] Enhance RocketChat livechat widget initialization with state persistence - Improved the initialization process to ensure the RocketChat widget is only set up once, preventing redundant initializations. - Added functionality to mark the widget iframe for persistence across page transitions, enhancing user experience during navigation. - Updated event listeners to maintain the persistence marker after DOM updates, ensuring consistent behavior of the livechat widget. --- src/layouts/Layout.astro | 87 +++++++++++++++++++--------------------- 1 file changed, 41 insertions(+), 46 deletions(-) diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro index 99d593f..0a53062 100644 --- a/src/layouts/Layout.astro +++ b/src/layouts/Layout.astro @@ -89,30 +89,21 @@ const { language, textDirection } = I18N;