Chrome Extensions for ungoogled Chromium without any website

You can use this code to download the extension file and let the Chromium install it without having to depend on third party websites to download extensions.

UnGoogled Chromium is a Chromium fork that strips any Google proprietary code from the source code. In doing so, it also removes the integration of Google Chrome Store for downloading extensions. The “Add to Chrome” button would not appear when opening an extension page.

Ungoogled chromium still supports extensions, it just lost its connection to Google’s services during the slaughter. Chrome Extensions are contained in a “crx” files. This file is downloaded in the background in Chrome so it’s not well known. You can manually download the extension file and let the Chromium install it. This way, you don’t have to depend on third party websites to download extensions. As is, with third party websites, you don’t have any assurance they are trust-worthy.

Screenshot of a extension installation prompt on Ungoogled-Chromium build
Extension installation prompt on Ungoogled-Chromium build

Preparation

The steps are quite simple and shouldn’t take very long. To make ungoogled-chromium install extensions when a crx file is downloaded, you have to enable a flag on the chromium build.

Setting extension-mime-request-handling flag to "Always prompt for install" on the chromium browser.
Setting extension-mime-request-handling flag on the chromium browser.

On PC

Next, you have to create a bookmarklet with a JavaScript code which you can run on any extension page. The simple code extracts your browser version, and the extension id to create a URL that induces a download of Chrome extension file. Then it goes to that URL. At this point, ungoogled-chromium will open a modal allowing you to install the extension you’re currently viewing.

javascript:location.href='https://clients2.google.com/service/update2/crx?response=redirect&acceptformat=crx2,crx3&prodversion='+(navigator.appVersion.match(/Chrome\/(\S+)/)[1])+'&x=id%'+'3D'+document.URL.replace(/\?.*/gm,'').split('/')[6]+'%'+'26installsource%'+'3Dondemand%'+'26uc';

The code is incorporated from ungoogled-chromium documentation page. It is slightly modified to make it shorter. You can use any one you prefer

On Android

On Ungoogled-chromium Android browser, it is much easier. After you turn on the mime-request-handling flag, you just have to visit the chrome extension store in the desktop mode to install the extension.

Turn on mime-request-handling flag on Chrome Flags.

Turn on Desktop site mode on Ungoogled Chromium Android

Screenshot of turnin on Desktop site mode on Ungoogled Chromium Android
Turn on Desktop site mode on Ungoogled Chromium Android

Install the extension by using the “Add to Chromium” button

Screenshot of adding extension on Ungoogled chromium browser on Android. made in desktop mode
Adding extension on Ungoogled chromium browser on Android

Finally,

That’s how you add extensions to your Ungoogled-chromium browser with the least amount of tinkering. You can alternatively install addons by downloading the crx file, unzipping it, enabling the developer mode, and loading the unpacked extension too. But that is more complicated just turning on a flag, and making a bookmarklet for downloading any extension on the store.

Leave a Reply