简体   繁体   中英

Is it possible to make the browser quit full screen mode only on entering a password?

I am thinking of making a game, but it involves staying in fullscreen mode always. You can only leave full screen mode on entering a password. Pressing Esc or toggling the fullscreen key shouldn't exit full screen mode. I can't divulge more details, but it involves leaving a person to interact with content of the page until another person who knows the password stops the interaction.

EDIT: I know it is not user friendly, but it is for a special purpose. It is there to leave kids to interact with, and be left alone with. If they escape out of the browser they would be able to tamper with other things on the computer which i dont want them too.

This is not plausible. All operating systems allow some sort of emergency application shut-down system. You will not be able to block these abilities.

You can't force the browser to stay in full-screen mode. Nor should you, it's just going to make your users angry.

If you don't mind angry users, you can try a Full-sreen popup . But really, try not to do that.

Fullscreen in a browser is a user setting. You can not possibly control this through html/javascript. The only way to acces and change a person's personal settings is through system calls in languages like C/C++ and C#. You will basically always need a program running on the client's computer to manage that kind of settings.

Since you don't need any more answers like "this is not user friendly" i would recommend you to have a look at some add-ons for firefox or chrome. You should have a look at some "Kiosk-Mode" add-ons.

Kiosk-mode is made for use cases where you have a pc in a public place and want to provide internet access. Maybe you can use one of those add-ons and configure it to get what you want.

If not, you should think about writing your own plugin for firefox or chrome in this add-on context you should have control over such things.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM