tor-browser

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

download-3-ref.html (984B)


      1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
      2 "http://www.w3.org/TR/html4/strict.dtd">
      3 <html lang="en-US">
      4 <head>
      5 <title></title>
      6 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      7 <style type="text/css">
      8 
      9 @font-face {
     10 	font-family: "MarkA";
     11 	src: url(../fonts/markA.ttf);
     12 }
     13 
     14 body { font-family: "MarkA"; }
     15 
     16 </style>
     17 </head>
     18 <body>
     19 
     20 <div id="t" style="visibility:hidden; width: -moz-fit-content">ABC</div>
     21 <script>
     22  // Force a reflow to make sure we start our font download now
     23  document.body.offsetWidth;
     24  window.addEventListener("load",
     25    function() {
     26      var n = document.getElementById("t");
     27      var w = document.defaultView.getComputedStyle(n).width;
     28      var h = document.defaultView.getComputedStyle(n).height;
     29      var d = document.createElement("div");
     30      d.style.width = w;
     31      d.style.height = h;
     32      d.style.backgroundColor = "green";
     33      n.remove();
     34      document.body.appendChild(d);
     35    });
     36 </script>
     37 </body>
     38 </html>