moonlight-chrome/static/js/background.js
utopiafallen eb458c1ad2 Remove explicit fullscreen handling
Moonlight's fullscreen requests generally conflict with
what ChromeOS is trying to do automatically for the app, especially when
using tablet mode. Just remove it for now and let the OS handle
fullscreen.
2022-11-06 19:58:35 -06:00

25 lines
584 B
JavaScript

const windowId = "1337";
function createWindow(state) {
chrome.app.window.create('index.html', {
state: "normal",
id: windowId,
});
}
chrome.app.runtime.onLaunched.addListener(function() {
console.log('Chrome app runtime launched.');
var windowState = 'normal';
if (chrome.storage) {
// load stored window state
chrome.storage.sync.get('windowState', function(item) {
windowState = (item && item.windowState) ?
item.windowState :
windowState;
createWindow(windowState);
});
} else {
createWindow(windowState);
}
});