mirror of
https://github.com/Ximi1970/systray-x.git
synced 2025-11-03 20:06:13 +01:00
Add minimize on startup
This commit is contained in:
@@ -54,3 +54,19 @@ async function getDefaultIcon() {
|
||||
console.debug("Default: " + iconBase64);
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Get window startup state
|
||||
//
|
||||
async function getStartupState() {
|
||||
function getStartupState(result) {
|
||||
return result.startMinimized == "true" ? "minimized" : "normal";
|
||||
}
|
||||
|
||||
function onStartupStateError() {
|
||||
return "normal";
|
||||
}
|
||||
|
||||
const getState = browser.storage.sync.get("startMinimized");
|
||||
return await getState.then(getStartupState, onStartupStateError);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user