Skip to content

Instantly share code, notes, and snippets.

@EverfreeFaerie
Created November 6, 2021 12:59
Show Gist options
  • Save EverfreeFaerie/f8f3a62b13e59ad94752a87135ff0297 to your computer and use it in GitHub Desktop.
Save EverfreeFaerie/f8f3a62b13e59ad94752a87135ff0297 to your computer and use it in GitHub Desktop.
Remove Firefox upsell components
#!/bin/bash
SCRIPTDIR=$(realpath $(dirname $0))
TMPDIR=$(mktemp -d)
cd "$TMPDIR"
echo "$TMPDIR"
unzip -q /usr/lib/firefox/browser/omni.ja
for item in $SCRIPTDIR/*.patch; do
patch -p0 < "$item"
done
sudo rm /usr/lib/firefox/browser/omni.ja
sudo zip -qr /usr/lib/firefox/browser/omni.ja *
rm -rf "$TMPDIR"
--- actors/AboutPrivateBrowsingParent.jsm 2010-01-01 00:00:00.000000000 +0100
+++ actors/AboutPrivateBrowsingParent.jsm 2021-11-06 12:31:19.307418563 +0100
@@ -161,13 +161,7 @@
break;
}
case "ShouldShowVPNPromo": {
- const homeRegion = Region.home || "";
- const currentRegion = Region.current || "";
- return (
- homeRegion.toLowerCase() !== "cn" &&
- currentRegion.toLowerCase() !== "cn" &&
- Services.policies.status !== Services.policies.ACTIVE
- );
+ return false;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment