From d3d6d7e6f4f00197c64bdc3f71a06146f0d7d924 Mon Sep 17 00:00:00 2001 From: Stephan Yelle Date: Mon, 1 Dec 2025 04:41:13 -0500 Subject: [PATCH] Update samy.ps1 --- samy.ps1 | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/samy.ps1 b/samy.ps1 index 7997c32..e8064c2 100644 --- a/samy.ps1 +++ b/samy.ps1 @@ -9,7 +9,8 @@ Last changes made should fix the issues we had wen running thi in Windows 11 25H Install-DattoRMM is the core helper that handles credential retrieval (webhook or direct), OAuth token management, site list fetching/persistence, registry variable pushes, agent downloads/installs, and optional installer archiving. The UI exposes all tasks as checkboxes with select-all helpers, and each action is wrapped in detailed logging plus - HTTP responders so callers can see success or failure. + HTTP responders so callers can see success or failure.$jsContent = Get-RemoteText -Url $Script:SamyJsUrl + Key features: - Credential retrieval - securely fetches ApiUrl, ApiKey, and ApiSecretKey from a webhook when requested. @@ -232,7 +233,13 @@ $ConfirmPreference = 'None' $Script:SamyBranch = 'beta' # or 'main' $Script:SamyRepoBase = 'https://git.svstools.ca/SVS_Public_Repo/SAMY/raw/branch' - $Script:SamyLogoUrl = "$Script:SamyRepoBase/$Script:SamyBranch/SVS_logo.svg" + + # Top-left corner logo (SVS) + $Script:SamyTopLogoUrl = "$Script:SamyRepoBase/$Script:SamyBranch/SVS_logo.svg" + + # Background SAMY image used in CSS + $Script:SamyBgLogoUrl = "$Script:SamyRepoBase/$Script:SamyBranch/SAMY.png" + $Script:SamyFaviconUrl = "$Script:SamyRepoBase/$Script:SamyBranch/SVS_Favicon.ico" $Script:SamyCssUrl = "$Script:SamyRepoBase/$Script:SamyBranch/samy.css?raw=1" $Script:SamyJsUrl = "$Script:SamyRepoBase/$Script:SamyBranch/samy.js?raw=1" @@ -1052,12 +1059,11 @@ function Get-UIHtml { $cssContent = Get-RemoteText -Url $Script:SamyCssUrl $jsContent = Get-RemoteText -Url $Script:SamyJsUrl - # Make the CSS background-image follow $Script:SamyLogoUrl + # Make the CSS background-image follow $Script:SamyBgLogoUrl if ($cssContent) { - $cssContent = $cssContent.Replace( - 'background-image: url("SAMY.png");', - "background-image: url(`"$Script:SamyLogoUrl`");" - ) + $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) } @@ -1081,7 +1087,7 @@ $cssContent
- SVS Logo + SVS Logo {{moduleVersion}}