diff --git a/samy.ps1 b/samy.ps1 index b700070..31e0f8c 100644 --- a/samy.ps1 +++ b/samy.ps1 @@ -1068,13 +1068,15 @@ function Get-UIHtml { $cssContent = Get-RemoteText -Url $Script:SamyCssUrl $jsContent = Get-RemoteText -Url $Script:SamyJsUrl - # Make the CSS background-image follow $Script:SamyBgLogoUrl - if ($cssContent) { - $pattern = 'background-image:\s*url\("SAMY\.png"\);?' # matches with or without extra spaces/semicolon - $replacement = "background-image: url('$Script:SamyBgLogoUrl');" - $cssContent = [regex]::Replace($cssContent, $pattern, $replacement) - } - + if ($cssContent) { + $cssContent += @" + +/* SAMY background override injected by script */ +.sidebar::after { + background-image: url('$Script:SamyBgLogoUrl') !important; +} +"@ +} # # 4) HTML template - **no external link/script src** anymore, all inlined