Earlier today a landing page for Microsoft Edge’s Extensions went live ahead of the official launch, it includes three downloadable extensions: Microsoft Translator, Reddit Enhancement Suite, and Mouse Gestures. For now the extensions are simple .exe files that extract the necessary files for sideloading into Edge to your Downloads folder. It’s currently impossible to get these extensions working in Edge (in Insider builds that is), but since the upcoming extension system in Edge is rumoured to be compatible to Google Chrome’s system I decided to try to load them in Chrome to find out just how compatible they really are. Turns out they’re nearly 100% compatible.
First up: Translator. After running the exe file and looking at the extracted resources it pretty much matches what you’d expect from a Chrome extension, there’s a manifest.json, an options page, a background page, a _locales folder.
I loaded the folder in Chrome (using the “Load unpacked extension” button on the extensions page) and got this error:
Easy enough to fix, just add “manifest_version”: 2, to the manifest. Retry.
Welp, that didn’t go as expected. Looks like localization is broken, or is it? Some localization files in the extension (\_locales\XX\messages.json) are empty, those obviously aren’t valid JSON and can’t be parsed by Chrome. Let’s delete all folders with an empty messages.json file in them and try again (or simply delete all folders except _locales\en):
Success! The Edge extension loads without any further problems and looks like any regular Chrome extension. (Notice the two Edge-specific keys in the manifest though.) The Translate button shows up in the toolbar and translates the page when clicked.
Next up: Mouse Gestures, this looks like a really interesting one. After adding a manifest_version and removing empty locales this extension too loads without any further issues.
The first run experience works as expected:
The settings page works:
Sadly i couldn’t get any of the gestures to work, maybe it’s an Edge thing that doesn’t work in Chrome, maybe I’m just not bright enough to figure out how it works… There’s one feature I got working, it’s only mentioned in the changelog, drag to open a link in a new tab:
Reddit Enhancement Suite
I applied the same changes as above to try and make this one work, but I ran into a rather unexpected issue:
A folder (vendor) was missing from the downloaded Edge Extension, super weird. Luckily RES is open source, so I downloaded the missing folder from the Chrome extension on RES’s GitHub page and placed it in the folder for the Edge extension. I also had to fix the manifest file, it listed vendor/snuownd.js instead of vendor/snudown.js. Then I had to copy over these files from GitHub to the modules folder: (seriously, who packaged this!?)
- And the entire \modules\hosts folder.
It finally worked.
What this means for Chrome -> Edge porting
While this Edge->Chrome compatibility doesn’t guarantee complete compatibility in the other direction, it sure looks like that’s what Microsoft is aiming for. The source code for these Edge extension pretty much looks like the original Chrome code with some additional code to replace “chrome” with “msBrowser” and 2 minor additions to manifest.json.