tor-browser

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

transition-in-empty-iframe-child.html (889B)


      1 <!DOCTYPE html>
      2 <html>
      3  <head>
      4    <style>
      5      ::view-transition-new(*) {
      6        animation: unset;
      7        opacity: 1;
      8      }
      9      ::view-transition-old(*) {
     10        animation-duration: 30s;
     11        opacity: 0;
     12      }
     13 
     14      div {
     15        width: 50vw;
     16        height: 50vh;
     17        background-color: limegreen;
     18        border: 1px solid black;
     19      }
     20 
     21      .hidden {
     22        display: none;
     23      }
     24 
     25    </style>
     26    <script>
     27      function newState() {
     28        document.querySelector('.hidden').classList.remove('hidden');
     29      }
     30 
     31      function startTransition() {
     32        window.transition = document.startViewTransition(newState);
     33      }
     34 
     35      const params = new URLSearchParams(window.location.search);
     36      if (params.has('ref')) {
     37        addEventListener('load', newState);
     38      }
     39    </script>
     40  </head>
     41  <body>
     42    <div class="hidden">
     43    </div>
     44  </body>
     45 </html>