diff --git a/src/App/functions.php b/src/App/functions.php index d0cbb80..e667608 100644 --- a/src/App/functions.php +++ b/src/App/functions.php @@ -400,8 +400,9 @@ function module_shell_header(string $module, array $options = []): string if ($title !== '') { $moduleTitle = trim((string) ($design['title'] ?? ucfirst($module))); + $selector = '.home-hero[data-module-name="' . $module . '"] .brand-copy h1'; $script = '(function(){' - . 'var root=document.querySelector(".home-hero[data-module-name=' . json_encode($module, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES) . '] .brand-copy h1");' + . 'var root=document.querySelector(' . json_encode($selector, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES) . ');' . 'if(!root){return;}' . 'var old=root.querySelector(".module-page-context");' . 'if(old){old.remove();}'