Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fullscreen option? #60

Closed
mjsir911 opened this issue Mar 12, 2022 · 7 comments
Closed

Fullscreen option? #60

mjsir911 opened this issue Mar 12, 2022 · 7 comments

Comments

@mjsir911
Copy link
Contributor

Hey, thank you for making this.

Is there an option to fullscreen the website? On firefox I can press F11 to fullscreen the browser but this doesn't hide the tabs without other workarounds. Is it possible / can you add the feature to full screen the app with a button (maybe F11?).

https://developer.mozilla.org/en-US/docs/Web/API/Fullscreen_API

Thanks!

@mon
Copy link
Owner

mon commented Mar 12, 2022

I cannot replicate that, hitting F11 hides everything on my copy of firefox. Your mouse isn't hiding at the top of the screen, keeping them active?

@mjsir911
Copy link
Contributor Author

mjsir911 commented Mar 12, 2022

ah thank you for the quick response, I have browser.fullscreen.autohide set to false, which is the desired behaviour for me for all websites except yours (I like to have my tabs available when full screened on i3)

@mon
Copy link
Owner

mon commented Mar 12, 2022

Am I right in assuming the fullscreen API ignored browser.fullscreen.autohide? Seems reasonable enough, just need to pick a key for it (I don't like the idea of overloading F11 with identical behaviour, feels like something that could break)

@mjsir911
Copy link
Contributor Author

mjsir911 commented Mar 12, 2022

Can confirm this lil snippet of code works in the console:

// define a handler
function doc_keyUp(e) {

    // this would test for whichever key is 40 (down arrow) and the ctrl key at the same time
  console.log(e.key)
    if (e.key === 'J') {
        // call your function to do the thing
        document.body.requestFullscreen();
      console.log('hi')
    }
}
// register the handler 
document.addEventListener('keyup', doc_keyUp, false);

It's a bit unintuitive since just running document.body.requestFullscreen() from the console doesn't work because it's technically running on no user input

@mon
Copy link
Owner

mon commented Mar 14, 2022

Just to bump this issue - might be a week or 3. I've just moved and need to reassemble my dev machine.

@mjsir911
Copy link
Contributor Author

Thanks for the update! if you decide upon a sane keycode I could see what I could do to help ;-)

@mon mon closed this as completed in 324efb7 Apr 28, 2022
@mon
Copy link
Owner

mon commented Apr 28, 2022

Added as Alt+Enter, since that's commonly used for fullscreen and not actually taken by Chrome/Firefox already (yay!).
Will make a new release later, for now it's live on my site when cloudflare evicts the cache - give it 48 hours.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants