Update samy.ps1

This commit is contained in:
2025-12-09 22:07:45 -05:00
parent b430c4c8f5
commit 18c7579f04

View File

@@ -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)
}
$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