From 2ac304dd0d1ea92058b7eb8ec7aa947bc75854a3 Mon Sep 17 00:00:00 2001 From: Emad Adel <19177373+emadadel4@users.noreply.github.com> Date: Thu, 21 Nov 2024 08:35:15 +0200 Subject: [PATCH] Update itt.ps1 --- itt.ps1 | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/itt.ps1 b/itt.ps1 index e5d6253e..b4210df1 100644 --- a/itt.ps1 +++ b/itt.ps1 @@ -7235,6 +7235,7 @@ function Startup { $win = [System.Environment]::OSVersion + # Display information @@ -7245,10 +7246,12 @@ function Startup { $runs = if ($existingData) { $existingData.runs + 1 + Telegram -Message "💻 '$env:USERNAME' has opened ITT again." } else { 1 + Telegram -Message "🎉A new device 👤'$env:USERNAME is now running ITT!`n`💻 $Win`n`🌍 Total users worldwide: $totalKeys" } # Update Firebase with the new value @@ -7259,10 +7262,14 @@ function Startup { $response = Invoke-RestMethod -Uri $firebaseUrlRoot -Method Get -ErrorAction SilentlyContinue $totalKeys = ($response | Get-Member -MemberType NoteProperty | Measure-Object).Count - if (-not $existingData) { - Telegram -Message "🎉A new device 👤'$env:USERNAME is now running ITT!`n`💻 $Win`n`🌍 Total users worldwide: $totalKeys" - }else{ - Telegram -Message "💻 '$env:USERNAME' has opened ITT again." + + if ($firebaseUrlWithKey) { + + Write-Host "OLD USER" + } + else + { + Write-Host "NEW" } Write-Host "`nITT has been used on $totalKeys devices worldwide.`n" -ForegroundColor White @@ -12856,23 +12863,23 @@ function Show-Event { - $itt.event.FindName('contribute').add_MouseLeftButtonDown({ - Start-Process('https://github.com/emadadel4/itt?tab=readme-ov-file#-how-to-contribute') + $itt.event.FindName('ytv').add_MouseLeftButtonDown({ + Start-Process('https://www.youtube.com/watch?v=QmO82OTsU5c') }) - $itt.event.FindName('ps').add_MouseLeftButtonDown({ - Start-Process('https://www.palestinercs.org/en/Donation') + $itt.event.FindName('shell').add_MouseLeftButtonDown({ + Start-Process('https://github.com/emadadel4/shelltube') }) - $itt.event.FindName('ytv').add_MouseLeftButtonDown({ - Start-Process('https://www.youtube.com/watch?v=QmO82OTsU5c') + $itt.event.FindName('contribute').add_MouseLeftButtonDown({ + Start-Process('https://github.com/emadadel4/itt?tab=readme-ov-file#-how-to-contribute') }) - $itt.event.FindName('shell').add_MouseLeftButtonDown({ - Start-Process('https://github.com/emadadel4/shelltube') + $itt.event.FindName('ps').add_MouseLeftButtonDown({ + Start-Process('https://www.palestinercs.org/en/Donation') })