Please use and enjoy it, and if you can make a donation of any amount, we'd appreciate it immensely

Turn Off the Lights Firefox WebExtensions Ready To Test It Out!

We last updated you on our progress with the Turn Off the Lights Microsoft Edge Extension, and today we have an update for the Firefox Webextensions extension, which is ready for in the Firefox Nightly web browser.

Mozilla Firefox is also moving to the same extension API as the Google Chrome Extension platform later this year. They called it the Webextensions. This technology is designed for cross-browser compatibilities such as Google Chrome, Opera, Chromium, and Microsoft Edge. Where Webextensions is more secure than the old Firefox overlay XUL technology.

Turn Off the Lights Firefox WebExtensions for Firefox Nightly
Firefox Nightly with the Turn Off the Lights extension

What’s new in this Webextensions version?

When you install this extension for the first time in your Firefox web browser, you will see that the gray lamp button is now in the address bar. And that it will not disturb you as a button in the toolbar. The lamp button is only visible on the website where it works such as the http and https protocol. It will not be visible on the page where it doesn’t work, such as the about:preferences, the settings page from Firefox.
By moving from XUL to this new extension technology, have this extension finally also the ‘no-restart‘ label. So you don’t need to restart the browser if there is a new Turn Off the Lights extension update is available in Firefox.

Of course are all the other most used features are still here, such as the Night Mode (that converts the webpage from a day to a night theme), the atmosphere lighting for HTML5 videos (shows a glow around the video player), YouTube AutoHD, etc.

You can try yourself the latest Turn Off the Lights Firefox extension (WebExtensions version). We tested it in the latest Firefox Nightly 49.0a1 (2016-04-29). Download the XPI file from our Github website, and load the file in the Firefox web browser from the menu Firefox -> ‘File’ -> ‘Open File…’.

Do you like our project? Please support our work. By sharing it! And if you can make a donation of any amount, we’d appreciate it immensely!

About The Author

Stefan Van Damme

Options page for the Turn Off the Lights Edge Extension

Edge extension options page button

The options page is now visible in Microsoft Edge! Microsoft released yesterday the new Windows 10 Insider build 14315 to all insiders. But what’s new in this build for the Extension developers?

Options page

As you read in our previous post, there was a workaround to open this page in your Edge web browser. Now the extension developers can open the Edge extension options page direct from the “extension” sidebar.

Translation

The first time we open our Options page, we saw no translations and only an empty text label. Because the Edge extension is a port of the Google Chrome extension, we found that the Chrome.i18n.getMessage doesn’t work to see our translation. That’s why we converted also here the Chrome.i18n.getMessage to the browser.i18n.getMessage JavaScript code.

Debug

This time Microsoft Edge web browser allows you to debug the background page of the Edge extension. To open this debug window you see an extra link below the path of your extension. When you click on this link (Inspect “Background page”), you see the debug window.

Security

Are there any security issues in Microsoft Edge? Yes, that’s possible. When I add a YouTube <iframe> player inside our options page, the whole page refresh and then it crashes. Or when I open inside the “Turn Off the Lights” Options page the “TOtL Guide”, the same happens here. The whole page crash and go to this page:

ms-appx-web:///assets/errorpages/acr_error.htm#ms-browser-extension://MSGname_pczg5z86wrh92/options.html

Need the roadmap of the Edge extension? You can find it here on that page. And to learn what extension API is supported, see this Microsoft Extension API page.

Want to test the new version of “Turn Off the Lights” with the Options page? Go to www.turnoffthelights.com/edge and click on the big blue download button to download the latest version on your Windows 10 desktop computer or Surface.
This Turn Off the Lights version 3.2.0.12 only works on preview build 14316 and later. We make sure this extension comes online on day one. So you get the best night and video experience. Please, if you like our work. Share it! And if you can make a donation of any amount, we’d appreciate it immensely!

About The Author

Stefan Van Damme

Turn Off the Lights Edge extension Powerful PREVIEW

Turn Off the Lights Edge extension Windows 10 Insider

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

turn off the lights edge extension icon searchbox

After

turn off the lights edge extension dim the page searchbox

– 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!

About The Author

Stefan Van Damme