diff --git a/README.md b/README.md index a29644a..3e07d5f 100644 --- a/README.md +++ b/README.md @@ -22,8 +22,9 @@ While cleaning up my GitHub (30+ repos down to 20 now), I also cleaned up thousa All optimization options are enabled by default โ€“ no need to tweak anything. 2. **Analyze Your System** - Click **"Analyze"** to scan your system based on the selected settings. - - **Red** items = Recommended fixes + Click **"Analyze"** to scan your system based on the selected settings. + + - **Red** items = Recommended fixes - **Gray** items = Already optimized 3. **Apply Fixes** diff --git a/docs/log-analyzer/index.html b/docs/log-analyzer/index.html index 0b46998..614a127 100644 --- a/docs/log-analyzer/index.html +++ b/docs/log-analyzer/index.html @@ -1,212 +1,231 @@ - - - Crapfixer Log Analyzer - - - - -
-

๐Ÿง  Crapfixer Log Analyzer

-
- GitHub - PayPal - Ko-fi -
-
+ .btn-group { + margin-top: 1rem; + } + + + + +
+

๐Ÿง  Crapfixer Log Analyzer

+
+ GitHub + PayPal + Ko-fi +
+
- -
-

How it works:

-
    -
  1. Run the analysis in Crapfixer and copy the full log.
  2. -
  3. Paste it into the box below.
  4. -
  5. Click Analyze to get results.
  6. -
+ +
+

How it works:

+
    +
  1. Run the analysis in Crapfixer and copy the full log.
  2. +
  3. Paste it into the box below.
  4. +
  5. Click Analyze to get results.
  6. +
- - + + - -
- - - - - -
+ +
+ + + + + +
- -
-
+ +
+
- - + // Native share (for mobile browsers) + function shareResult() { + const text = document.getElementById("output").innerText; + if (navigator.share) { + navigator + .share({ + title: "Crapfixer Analysis Results", + text: text, + }) + .catch((err) => console.log("Share failed:", err)); + } else { + alert("Sharing is not supported by your browser."); + } + } - - - + // Share the result as an image on Twitter/X + function shareOnTwitter() { + const outputEl = document.getElementById("output"); + if (!outputEl.innerText.trim()) return alert("No results to share yet."); + + // Create screenshot from result div + html2canvas(outputEl).then((canvas) => { + const dataUrl = canvas.toDataURL("image/png"); + + // Convert image to base64 string (can't upload directly to Twitter) + // Instead, show preview and user uploads manually via prompt + const win = window.open(); + win.document.write(`

๐Ÿ“ท Screenshot ready for X / Twitter

`); + win.document.write( + `

Right-click the image below and save it to upload on Twitter manually.

` + ); + win.document.write( + `` + ); + win.document.write( + `

โžก๏ธ Click here to post on X

` + ); + }); + } + + + + + diff --git a/docs/update-check.html b/docs/update-check.html index a198470..0034370 100644 --- a/docs/update-check.html +++ b/docs/update-check.html @@ -131,8 +131,12 @@ ๐Ÿ’– Support Crapfixer Every donation helps me provide more updates. โ€“ Thanks, Belim ๐Ÿ™

- ๐Ÿ’ธ PayPal - โ˜• Ko-fi + ๐Ÿ’ธ PayPal + โ˜• Ko-fi
@@ -158,8 +162,7 @@ const status = document.getElementById("status"); if (!userVersion) { - status.innerText = - "โ“ No version found. Please open this page from the Crapfixer app."; + status.innerText = "โ“ No version found. Please open this page from the Crapfixer app."; } else { const result = compareVersions(userVersion, latestVersion); diff --git a/plugins/CFEnhancer.txt b/plugins/CFEnhancer.txt index 051c206..232edfc 100644 --- a/plugins/CFEnhancer.txt +++ b/plugins/CFEnhancer.txt @@ -1,6 +1,6 @@ -Solitaire,CandyCrush,Netflix,TikTok,Facebook,Twitter,Instagram,Spotify, -Skype,OneNote,OneDrive, Mail, Calendar, Weather,News,Maps, -Groove, Movies,TV, Phone, Camera,Feedback,FeedbackHub, GetHelp, +Solitaire,CandyCrush,Netflix,TikTok,Facebook,Twitter,Instagram,Spotify, +Skype,OneNote,OneDrive,Mail,Calendar,Weather,News,Maps, +Groove,Movies,TV,Phone,Camera,Feedback,FeedbackHub,GetHelp, GetStarted,Messaging,Office,Paint3D,Print3D,StickyNotes,Wallet, YourPhone,3DViewer,Alarms,VoiceRecorder,ToDo,Whiteboard,ZuneMusic, -ZuneVideo,3DViewer, DevHome, Copilot \ No newline at end of file +ZuneVideo,DevHome,Copilot \ No newline at end of file diff --git a/plugins/Create Restore Point.ps1 b/plugins/Create Restore Point.ps1 index 24c0888..55a6ae2 100644 --- a/plugins/Create Restore Point.ps1 +++ b/plugins/Create Restore Point.ps1 @@ -1,6 +1,5 @@ ๏ปฟ# Run as Admin -if (-not ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) -{ +if (-not ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) { Write-Warning "You need to run this script as an Administrator!" exit } @@ -15,7 +14,7 @@ $restorePointType = 12 # MODIFY_SETTINGS = 12 # Function to create restore point with progress reporting function Create-RestorePoint { Write-Host "Starting to create restore point..." -ForegroundColor Yellow - + # Simulate progress for ($i = 0; $i -le 100; $i += 10) { Write-Progress -Activity "Creating Restore Point" -Status "$i% Complete" -PercentComplete $i @@ -28,10 +27,10 @@ function Create-RestorePoint { } Write-Host "Restore point created successfully." -ForegroundColor Green - + # Show completion message [System.Windows.Forms.MessageBox]::Show("Restore point has been created successfully!", "Completion", [System.Windows.Forms.MessageBoxButtons]::OK, [System.Windows.Forms.MessageBoxIcon]::Information) } # Execute the restore point creation -Create-RestorePoint +Create-RestorePoint \ No newline at end of file diff --git a/plugins/Remove default apps.ps1 b/plugins/Remove default apps.ps1 index 98a1ce4..b5d57d5 100644 --- a/plugins/Remove default apps.ps1 +++ b/plugins/Remove default apps.ps1 @@ -10,7 +10,8 @@ do {} until (Elevate-Privileges SeTakeOwnershipPrivilege) Write-Output "Uninstalling default apps" $apps = @( - # default Windows 10 apps + # Group by Microsoft and third-party + # Microsoft Apps "Microsoft.549981C3F5F10" #Cortana "Microsoft.3DBuilder" "Microsoft.Appconnector" @@ -90,7 +91,7 @@ $apps = @( "A278AB0D.DisneyMagicKingdoms" "A278AB0D.MarchofEmpires" "ActiproSoftwareLLC.562882FEEB491" # next one is for the Code Writer from Actipro Software LLC - "CAF9E577.Plex" + "CAF9E577.Plex" "ClearChannelRadioDigital.iHeartRadio" "D52A8D61.FarmVille2CountryEscape" "D5EA27B7.Duolingo-LearnLanguagesforFree" @@ -138,8 +139,8 @@ foreach ($app in $apps) { Get-AppxPackage -Name $app -AllUsers | Remove-AppxPackage -AllUsers - ($appxprovisionedpackage).Where( {$_.DisplayName -EQ $app}) | - Remove-AppxProvisionedPackage -Online + ($appxprovisionedpackage).Where( { $_.DisplayName -EQ $app }) | + Remove-AppxProvisionedPackage -Online } Write-Host "Clippy has completed the process and removed all possible apps." # Prevents Apps from re-installing @@ -169,4 +170,4 @@ Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\WindowsStore" "AutoDow # Prevents "Suggested Applications" returning New-FolderForced -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\CloudContent" -Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\CloudContent" "DisableWindowsConsumerFeatures" 1 +Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\CloudContent" "DisableWindowsConsumerFeatures" 1 \ No newline at end of file diff --git a/plugins/Restart Explorer.ps1 b/plugins/Restart Explorer.ps1 index e926aa9..27bcb23 100644 --- a/plugins/Restart Explorer.ps1 +++ b/plugins/Restart Explorer.ps1 @@ -1,4 +1,13 @@ -๏ปฟ# Function to show a message box +๏ปฟ#Requires -RunAsAdministrator + +# Check if running as Administrator +if (-not ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) { + Write-Warning "This script is recommended to be run as Administrator for best results." + # Decide if you want to force exit or just warn + # exit # Uncomment to force admin +} + +# Function to show a message box function Show-MessageBox { param ( [string]$message, @@ -15,4 +24,4 @@ Stop-Process -Name explorer -Force Start-Process explorer # Show message box -Show-MessageBox -message "Windows Explorer has been restarted successfully." -title "Crapfixer" +Show-MessageBox -message "Windows Explorer has been restarted successfully." -title "Crapfixer" \ No newline at end of file diff --git a/plugins/Restore all built-in apps.ps1 b/plugins/Restore all built-in apps.ps1 index 0db23e8..fa54a00 100644 --- a/plugins/Restore all built-in apps.ps1 +++ b/plugins/Restore all built-in apps.ps1 @@ -1,3 +1,12 @@ +#Requires -RunAsAdministrator + +# Check if running as Administrator +if (-not ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) { + Write-Warning "This script must be run as Administrator." + Start-Process powershell.exe -Verb RunAs -ArgumentList ("-File `"{0}`"" -f $MyInvocation.MyCommand.Path) + exit +} + # Get all installed Windows apps for all users $allApps = Get-AppxPackage -AllUsers @@ -16,7 +25,8 @@ foreach ($app in $allApps) { Add-AppxPackage -Register "$($app.InstallLocation)\appxmanifest.xml" -DisableDevelopmentMode -ErrorAction Stop Write-Host "[$currentAppIndex / $totalApps] $($app.Name) reinstalled successfully." -ForegroundColor Green $reinstalledCount++ - } catch { + } + catch { Write-Host "[$currentAppIndex / $totalApps] Error occurred while reinstalling $($app.Name): $_" -ForegroundColor Red } @@ -28,4 +38,7 @@ foreach ($app in $allApps) { if ($reinstalledCount -eq $totalApps) { Write-Host "All apps reinstalled successfully." -ForegroundColor Green Write-Host "Flyby11 has reinstalled everything possible." -ForegroundColor Cyan -} + # Add success percentage reporting + $successPercentage = [math]::Round(($reinstalledCount / $totalApps) * 100, 2) + Write-Host "Completed with $successPercentage% success rate ($reinstalledCount of $totalApps apps reinstalled)" -ForegroundColor Cyan +} \ No newline at end of file diff --git a/plugins/Uninstall OneDrive.ps1 b/plugins/Uninstall OneDrive.ps1 index 6567bd3..4604e42 100644 --- a/plugins/Uninstall OneDrive.ps1 +++ b/plugins/Uninstall OneDrive.ps1 @@ -1,3 +1,12 @@ +#Requires -RunAsAdministrator + +# Check if running as Administrator +if (-not ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) { + Write-Warning "This script must be run as Administrator." + Start-Process powershell.exe -Verb RunAs -ArgumentList ("-File `"{0}`"" -f $MyInvocation.MyCommand.Path) + exit +} + Import-Module -DisableNameChecking $PSScriptRoot\..\lib\force-mkdir.psm1 Import-Module -DisableNameChecking $PSScriptRoot\..\lib\take-own.psm1 @@ -50,11 +59,11 @@ Write-Output "Restarting explorer" Start-Process "explorer.exe" Write-Output "Waiting for explorer to complete loading" -Start-Sleep 10 +Start-Sleep 10 # Consider if this sleep is always necessary or could be shorter/conditional Write-Output "Removing additional OneDrive leftovers" foreach ($item in (Get-ChildItem "$env:WinDir\WinSxS\*onedrive*")) { Takeown-Folder $item.FullName Remove-Item -Recurse -Force $item.FullName } -Write-Output "Bloatynosy NueEx can confirm the uninstallation of the OneDrive app." +Write-Output "Bloatynosy NueEx can confirm the uninstallation of the OneDrive app." \ No newline at end of file