foxy gesturesのUser Scriptsで

ウィンドウを最大化・規定サイズに戻す
executeInBackground(() => {
getCurrentWindow().then(cwin => {
if(cwin.state == "normal"){
browser.windows.update(cwin.id,{state: "maximized"});
}else{
browser.windows.update(cwin.id,{width: 1024, height: 768});
}
});
}, []);

これをウィンドウを最大化 / 元のサイズに戻す にしたいのですが
何処を書き直せばいいんでしょうか