Microsoft released on 17 March 2016 the support of loading your own Edge extension in the Edge web browser. If you are a member of the Windows Insider Program using the fast ring. Build 14291 adds the option to load the edge extension from the three dots menu.
Convert to Edge Extension
We have converted already our Turn Off the Lights Chrome extension version 3.2.0.10 to Edge. These are the basic steps we want to share with you on how to get the Chrome extension working on your Edge web browser.
– If you add this script on top of all your JavaScript files from your Chrome extension, then the most converting is already done. If you have not an advanced extension, then this extension works direct well in your Edge browser.
if (typeof msBrowser !== ‘undefined’) {
chrome = msBrowser;
}
else if (typeof browser != ‘undefined’) {
chrome = browser;
}
– Previous week we converted the Chrome Storage in our Chrome extension to a Cloud version. But when we are converting this to the Edge extension, it doesn’t support the “sync” feature from the Google Chrome Extension API, so you as the developer must change the code from this:
chrome.storage.sync.get
to this
chrome.storage.local.get
– Our Turn Off the Lights extension use the pageaction icon, so the icon is also visible in the first page when you open the Edge web browser. Just right of the blue search button. When you click on the gray lamp button, it dims only the webview element. And that is just below the search box, the other part is gray and is coming from the browser UI.
Before
After
– In build 14291 there is no “Options” button visible on the extension page, so you can’t change a setting in the “Turn Off the Lights” options page. If we tried to do a workaround, paste the URL in the address bar.
ms-browser-extension://MSGname_sdzsm1k4cng40/options.html
You see the pages loading, and then suddenly it goes to a Microsoft Edge error page.
Turn Off the Lights is an open-source project, and you can browse our code on the Github page. It’s a Preview version and we are going to research this more and more. Turn Off the Lights will be ready for you on day one of the public releases. Please don’t forget to support our work by sharing this news and if you can make a donation of any amount, we’d appreciate it immensely!