Javascript: Configure web page to open it in fullscreen mode

Task: Add configuration to webpage to open it in fullscreen mode

Implementation:

1. add manifest.json file with:

{
  "name": "WebClock",
  "short_name": "WebClock",
  "start_url": "https://scalan.com/apps/clock/index.html",
  "display": "standalone",
  "icons": [{
    "src": "images/logo.png",
    "sizes": "512x512",
    "type": "image/png"
  }]
}

2. add using of it in your index.html file:

...
    <head>
        <meta charset="utf-8">
        <title>WebClock</title>
        <link rel="manifest" href="manifest.json">
    </head>
    <body>
        <h1>Clock</h2>
...

Done.

Leave a Reply

Your email address will not be published. Required fields are marked *

2  +  5  =  

Skynin cache:
Array ( [cache mode] => capture [requestKey] => 8234afca20b07ad92e8623e3f91d151dbc.sc [skycache_disable_capture] => false )