Another URL Cleaner

A Windows background app that automatically strips tracking parameters from URLs on the clipboard

View on GitHub
Home Configuration Architecture Development

Prerequisites

Build

dotnet build src/

The built executable will be in src/bin/Debug/net10.0-windows/.

Test

dotnet test tests/

Project structure

/
  url-cleaner.sln
  config/
    default.json              default config (embedded resource)
  src/
    UrlCleaner.csproj         targets net10.0-windows
    Program.cs                entry point
    TrayApplicationContext.cs  system tray app (NotifyIcon, context menu)
    AppConfig.cs              config model, JSON loader, autostart helpers
    ClipboardMonitor.cs       Win32 clipboard listener (NativeWindow)
    UrlSanitizer.cs           URL cleaning logic
    PathConverter.cs          backslash-to-forward-slash path conversion
  tests/
    UrlSanitizerTests.cs      URL cleaning tests
    PathConverterTests.cs     path conversion tests

Configuration defaults

config/default.json is embedded into the DLL as a .NET resource (LogicalName="UrlCleaner.default.json"). On first run, the app generates config.json next to the executable from this embedded default. To update the defaults for new builds, edit config/default.json.