DEV Community

Sergei Lutov
Sergei Lutov

Posted on

Installing uBlock Origin in Google Chrome: workarounds and limitations (macOS)

Google Chrome version 151 was released, and support for extensions using Manifest V2 has been completely removed in this version.

I’ve come up with a solution that will allow you to install the full version of uBlock (not the lite version) in your browser.

First of all, you'll need to remain on an older browser version. While this shouldn't have any immediate drawbacks, using an outdated browser long-term is not recommended. It may expose you to unpatched security vulnerabilities and prevent access to newer JavaScript, CSS, and other web platform features. Continue only if you're fully aware of these limitations and accept the associated risks.

Perhaps someone will create a fork or workaround that enables a proper ad blocker to work with Blink. Until then, it's either this or switching to Safari or Firefox.

Chrome installation

1. Prevent Chrome from updating (run in terminal):

mkdir ~/Library/Google/GoogleSoftwareUpdate
chmod 000 ~/Library/Google/GoogleSoftwareUpdate
Enter fullscreen mode Exit fullscreen mode

2. Install the latest version, which supports Manifest V2: 150.0.7871.187

Unfortunately, Google does not provide direct links to download previous versions of the browser. You’ll have to find them, but please be careful.

3. Validate app via next command:
spctl -a -vv /Volumes/Google\ Chrome/Google\ Chrome.app

The result should be:

/Volumes/Google Chrome/Google Chrome.app: accepted
source=Notarized Developer ID
origin=Developer ID Application: Google LLC (EQHXZ8M8AV)
Enter fullscreen mode Exit fullscreen mode

If everything’s OK, copy it to Applications.

Now we need to create an additional application that will launch Google Chrome with special flags

  1. Open Automator
  2. File -> New -> Application
  3. Pick from the left bar Run Shell Script
  4. Put the next content into textarea:
open -a "Google Chrome" --args \
  --disable-features=ExtensionManifestV2Unsupported,ExtensionManifestV2Disabled
Enter fullscreen mode Exit fullscreen mode
  1. Cmd+S, save it into Applications with Google Chrome MV2.app name, f.e.

uBlock installation

  1. Download extension for chromium here: https://github.com/gorhill/uBlock/releases
  2. Unpack it into ~/Chrome Extensions/ (or any other path what you want)
  3. Go to chrome://extensions/ and enable Developer Mode
  4. Click Load unpacked button -> select directory with uBlock extension (from step 2)

You'll see some warnings, but you can ignore them.

Enjoy!

Top comments (0)