mirror of
https://github.com/vale981/tridactyl
synced 2025-03-05 09:31:41 -05:00
Add fullscreen
command
Hold `.` after running for extra fun.
This commit is contained in:
parent
87574e0d6d
commit
647ea742c1
2 changed files with 14 additions and 1 deletions
2
package-lock.json
generated
2
package-lock.json
generated
|
@ -9518,7 +9518,7 @@
|
|||
}
|
||||
},
|
||||
"web-ext-types": {
|
||||
"version": "github:kelseasy/web-ext-types#5fa885198a9d43a35dfd0afec64c5ff89338f8a0",
|
||||
"version": "github:kelseasy/web-ext-types#daae1085685b97efdb98c59668cbdfd91c5c874c",
|
||||
"dev": true
|
||||
},
|
||||
"webidl-conversions": {
|
||||
|
|
|
@ -975,6 +975,19 @@ export async function tabdetach(index?: number) {
|
|||
browser.windows.create({tabId: await idFromIndex(index)})
|
||||
}
|
||||
|
||||
/** Toggle fullscreen state
|
||||
|
||||
*/
|
||||
//#background
|
||||
export async function fullscreen() {
|
||||
// Could easily extend this to fullscreen / minimise any window but seems like that would be a tiny use-case.
|
||||
const currwin = await browser.windows.getCurrent()
|
||||
const wid = currwin.id
|
||||
// This might have odd behaviour on non-tiling window managers, but no-one uses those, right?
|
||||
const state = currwin.state == "fullscreen" ? "normal" : "fullscreen"
|
||||
browser.windows.update(wid,{state})
|
||||
}
|
||||
|
||||
/** Close a tab.
|
||||
|
||||
Known bug: autocompletion will make it impossible to close more than one tab at once if the list of numbers looks enough like an open tab's title or URL.
|
||||
|
|
Loading…
Add table
Reference in a new issue