Restore the code that fullscreen at startup

This commit is contained in:
Nguyễn Gia Phong 2019-07-12 21:09:35 +07:00
parent c1ade49cb0
commit 3a2ce4a2eb
5 changed files with 9 additions and 6 deletions

View File

@ -1,6 +1,6 @@
# alful
This three-line extension makes Firefox Quantum open all windows in fullscreen
This six-line extension makes Firefox Quantum open all windows in fullscreen
to hide the toolbars in windowed mode (`full-screen-api.ignore-widgets = true`).
All credits go to tazeat, who wrote the original version and suggested
[the change to achieve the current behavior](https://github.com/tazeat/AutoFullscreen/issues/4#issuecomment-509723353).

View File

@ -1,3 +0,0 @@
browser.windows.onCreated.addListener(function (window) {
browser.windows.update(window.id, {state: "fullscreen"})
})

6
background.js Normal file
View File

@ -0,0 +1,6 @@
function fullscreen (window) {
browser.windows.update(window.id, {state: "fullscreen"})
}
browser.windows.getAll().then(windows => windows.forEach(fullscreen));
browser.windows.onCreated.addListener(fullscreen);

BIN
icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 783 B

View File

@ -1,12 +1,12 @@
{
"manifest_version": 2,
"name": "alful",
"version": "0.1",
"version": "0.2",
"description": "Lauch all Firefox Quantum windows fullscreen",
"homepage_url": "https://github.com/McSinyx/alful",
"icons": {"48": "icon.svg", "96": "icon.svg"},
"background": {"scripts": ["alful.js"]},
"background": {"scripts": ["background.js"]},
"applications": {"gecko": {"strict_min_version": "48.0"}}
}