tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

display-member-media-feature-standalone-manual.html (1147B)


      1 <!DOCTYPE html>
      2 <title>Test "standalone" value of display member + media feature</title>
      3 <link rel="help" href="https://w3c.github.io/manifest#display-member" />
      4 <link rel="help" href="https://w3c.github.io/manifest/#the-display-mode-media-feature" />
      5 <link rel="help" href="https://w3c.github.io/manifest/#dom-displaymodetype-standalone" />
      6 <link rel="manifest" href="resources/display-member-media-feature-standalone.webmanifest" />
      7 <script src="resources/display-member-media-feature-manual.js"></script>
      8 <meta name="viewport" content="width=device-width, initial-scale=1">
      9 <h1>Testing support for "standalone" value of display member + media feature</h1>
     10 <style>
     11  .fail {
     12    background-color: red;
     13  }
     14 
     15  @media all and (display-mode: standalone) {
     16    body {
     17      background-color: green;
     18    }
     19  }
     20 </style>
     21 <script>
     22 const standalone = matchMedia("(display-mode: standalone)");
     23 
     24 standalone.onchange = () => {
     25  if (standalone.matches) {
     26    document.body.classList.remove("fail");
     27  }
     28 }
     29 
     30 if (!standalone.matches) {
     31  document.body.classList.add("fail");
     32 }
     33 </script>
     34 <p>
     35  To pass, the background color must be green after installing.
     36 </p>