Change to apply fullscreen to all windows instead of current window.

This commit is contained in:
tazeat 2018-10-10 18:01:16 -07:00
parent 70fbe24185
commit 546bb28161
2 changed files with 6 additions and 4 deletions

View File

@ -2,7 +2,7 @@
"description": "Auto Fullscreen for Firefox Quantum",
"manifest_version": 2,
"name": "AutoFullscreen",
"version": "1.0.0.1",
"version": "1.0.0.2",
"homepage_url": "https://github.com/tazeat/AutoFullscreen",
"background":{
"scripts": ["startup.js"]

View File

@ -3,6 +3,8 @@ function onError(error) {
}
console.log(`AutoFullscreen Running`);
browser.windows.getCurrent().then((currentWindow) => {
browser.windows.update(currentWindow.id, {state: "fullscreen"});
});
browser.windows.getAll().then((windowInfoArray) => {
for (currentWindow of windowInfoArray) {
browser.windows.update(currentWindow.id, {state: "fullscreen"});
}
}, onError);