diff --git a/.gitignore b/.gitignore index a44a176..c8373ad 100644 --- a/.gitignore +++ b/.gitignore @@ -26,7 +26,6 @@ apps/mobile/android/ apps/mobile/ios/ # Bundled at build time (fetched, GPL — not vendored) -apps/desktop/extensions/ublock-origin/ # Ubuntu Touch click staging (assembled from the release tarball) distribution/ubuntu-touch/install/ diff --git a/apps/desktop/launcher/tronbrowser b/apps/desktop/launcher/tronbrowser index 58f248b..60da645 100755 --- a/apps/desktop/launcher/tronbrowser +++ b/apps/desktop/launcher/tronbrowser @@ -18,7 +18,7 @@ while [ -L "$SELF" ]; do esac done DIR="$(CDPATH= cd -- "$(dirname -- "$SELF")" && pwd)" -EXTBASE_SRC="$DIR/extensions" # holds ai-sidebar + ublock-origin (uBlock Origin) +EXTBASE_SRC="$DIR/extensions" # holds ai-sidebar + marksyncr # --- Tor mode ------------------------------------------------------------- # `tron --tor [url...]` routes traffic through a local Tor daemon (SOCKS5) and @@ -441,8 +441,10 @@ if [ "$TOR" != "1" ]; then printf '%s\n' "$ENGINE" > "$ENGINE_MARK" 2>/dev/null || true fi -# Keep Manifest V2 working so uBlock Origin (MV2) loads — recent Chromium disables -# MV2 by default. (Ungoogled keeps MV2, but force it off everywhere to be safe.) +# Keep Manifest V2 working — recent Chromium disables MV2 by default, which +# silently breaks any MV2 extension the user installed themselves. We no longer +# bundle one, but the kill switch is not ours to flip on their behalf. +# (Ungoogled keeps MV2, but force it off everywhere to be safe.) MV2_KEEP="ExtensionManifestV2Disabled,ExtensionManifestV2Unsupported,ExtensionManifestV2DeprecationWarning,ExtensionManifestV2DeprecationUnsupported" FLAGS="--user-data-dir=$DATA --class=TronBrowser --no-first-run --no-default-browser-check --no-pings --disable-background-networking --disable-breakpad --disable-domain-reliability --disable-sync --disable-features=Translate,OptimizationHints,InterestFeedContentSuggestions,$MV2_KEEP --load-extension=$EXT" @@ -480,8 +482,8 @@ fi # # --enable-features / --disable-features merge rather than being replaced: they # are comma-separated lists, and dropping ours wholesale would quietly re-enable -# the Manifest V2 kill switch (uBlock Origin stops loading) just because the -# caller wanted one unrelated feature. Rotating through "$@" to pull those two +# the Manifest V2 kill switch (every MV2 extension stops loading) just because +# the caller wanted one unrelated feature. Rotating through "$@" to pull those two # out is the same idiom --tor is stripped with above. # # This runs BEFORE the Tor block on purpose. Tor's proxy flags are a guarantee, diff --git a/apps/desktop/launcher/tronbrowser.cmd b/apps/desktop/launcher/tronbrowser.cmd index 36d19e0..c1aa39a 100644 --- a/apps/desktop/launcher/tronbrowser.cmd +++ b/apps/desktop/launcher/tronbrowser.cmd @@ -2,7 +2,7 @@ setlocal enabledelayedexpansion rem TronBrowser launcher (Windows). Runs Ungoogled Chromium ONLY (never Chrome, rem Edge, Brave, or regular Chromium) with TronBrowser privacy flags + bundled -rem extensions (AI sidebar + uBlock Origin). `tron ` passes URLs through. +rem extensions (AI sidebar + MarkSyncr). `tron ` passes URLs through. rem Mirrors apps/desktop/launcher/tronbrowser (POSIX). Override the binary with rem set "TRONBROWSER_BROWSER=C:\path\to\ungoogled-chromium\chrome.exe". set "DIR=%~dp0" diff --git a/apps/desktop/scripts/build-release.sh b/apps/desktop/scripts/build-release.sh index 9a79f6d..f8c0f8f 100755 --- a/apps/desktop/scripts/build-release.sh +++ b/apps/desktop/scripts/build-release.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Assemble TronBrowser release archives (launcher shim + AI sidebar + uBlock -# Origin + chromium-web-store extensions) +# Assemble TronBrowser release archives (launcher shim + AI sidebar + MarkSyncr +# + chromium-web-store extensions) # for a given platform. Until the native fork binary is built, this packages the # launcher; asset names are stable so install.sh / package managers are unchanged. # @@ -14,25 +14,6 @@ DESKTOP="$REPO_ROOT/apps/desktop" OUT="$REPO_ROOT/dist" mkdir -p "$OUT" -# Fetch uBlock Origin ONCE (the per-platform stage() copies from here). Full -# uBlock Origin is MV2 — Ungoogled Chromium keeps MV2 support, so we ship the -# real thing (not uBO Lite). The release asset name carries the version, so we -# resolve the latest .chromium.zip via the GitHub API. Entirely non-fatal. -UBO_SRC="" -fetch_ublock() { - command -v python3 >/dev/null 2>&1 || { echo " ! uBlock skipped (no python3)"; return; } - local url - url="$(curl -fsSL https://api.github.com/repos/gorhill/uBlock/releases/latest 2>/dev/null \ - | python3 -c 'import sys,json;d=json.load(sys.stdin);print(next((a["browser_download_url"] for a in d["assets"] if a["name"].endswith(".chromium.zip")),""))' 2>/dev/null)" || true - [ -n "$url" ] || { echo " ! uBlock resolve skipped (non-fatal)"; return; } - local z d m; z="$(mktemp)"; d="$(mktemp -d)" - if curl -fsSL "$url" -o "$z" 2>/dev/null && unzip -q -o "$z" -d "$d" 2>/dev/null; then - m="$(find "$d" -maxdepth 2 -name manifest.json | head -1)" - if [ -n "$m" ]; then UBO_SRC="$(dirname "$m")"; echo " + fetched uBlock Origin ($url)"; fi - fi - rm -f "$z" # keep $d (UBO_SRC lives inside) until the script exits -} - # Fetch MarkSyncr ONCE from the Chrome Web Store (latest published CRX). Open # source (github.com/profullstack/marksyncr.com), MV3 bookmark sync. Non-fatal. MKS_ID="hjcjjcpialiakkalcgadnfnoomdaegjg" @@ -141,11 +122,6 @@ DESKTOP # installs are instead handled by the AI sidebar's install-helper.js content # script (adds a working "Add to TronBrowser" button → CRX install prompt). - # Default ad/tracker blocker: uBlock Origin (fetched once into $UBO_SRC). - if [ -n "$UBO_SRC" ] && [ -d "$UBO_SRC" ]; then - mkdir -p "$s/extensions/ublock-origin" - cp -R "$UBO_SRC/." "$s/extensions/ublock-origin/" - fi # Bundled bookmark sync: MarkSyncr (fetched once into $MKS_SRC). if [ -n "$MKS_SRC" ] && [ -d "$MKS_SRC" ]; then mkdir -p "$s/extensions/marksyncr" @@ -164,7 +140,6 @@ build_archive() { # ext-type rm -rf "$t" } -fetch_ublock fetch_marksyncr case "$PLATFORM" in diff --git a/apps/desktop/test/launcher.test.ts b/apps/desktop/test/launcher.test.ts index d4a3946..4b1074e 100644 --- a/apps/desktop/test/launcher.test.ts +++ b/apps/desktop/test/launcher.test.ts @@ -100,7 +100,7 @@ describe('launcher flags', () => { }); it('merges --disable-features, keeping the Manifest V2 kill switch off', () => { - // Dropping ours here would stop uBlock Origin (MV2) from loading. + // Dropping ours here would stop every MV2 extension from loading. const { argv } = run(['--disable-features=Foo']); const disabled = valueOf(argv, '--disable-features'); expect(disabled).toHaveLength(1); diff --git a/eslint.config.js b/eslint.config.js index 7aa5bcf..bf2cdd1 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -16,7 +16,6 @@ export default tseslint.config( '**/.expo/**', '**/node_modules/**', 'apps/desktop/chromium/**', - 'apps/desktop/extensions/ublock-origin/**', // fetched at build time, GPL, not vendored 'pnpm-lock.yaml', ], },