Update samy.ps1
This commit is contained in:
14
samy.ps1
14
samy.ps1
@@ -1068,13 +1068,15 @@ function Get-UIHtml {
|
|||||||
$cssContent = Get-RemoteText -Url $Script:SamyCssUrl
|
$cssContent = Get-RemoteText -Url $Script:SamyCssUrl
|
||||||
$jsContent = Get-RemoteText -Url $Script:SamyJsUrl
|
$jsContent = Get-RemoteText -Url $Script:SamyJsUrl
|
||||||
|
|
||||||
# Make the CSS background-image follow $Script:SamyBgLogoUrl
|
if ($cssContent) {
|
||||||
if ($cssContent) {
|
$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)
|
|
||||||
}
|
|
||||||
|
|
||||||
|
/* 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
|
# 4) HTML template - **no external link/script src** anymore, all inlined
|
||||||
|
|||||||
Reference in New Issue
Block a user