<!DOCTYPE html>

<html>
  <head>
    <meta charset="utf-8" />
    <title>Panoptes</title>
    <link rel="stylesheet" href="./main.css" />
  </head>

  <body>
    <script>
      // Rather have a flash of unstyled text than to wait for these to load every time.
      (function() {
        var isProduction = parseFloat(location.port) < 1024;

        setTimeout(function() {
          document.head.insertAdjacentHTML('beforeEnd', [
            '<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Montserrat:400,700" class="delayed-load" />',
            '<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Playfair+Display:700" class="delayed-load" />',
            '<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css" class="delayed-load" />'
          ].join('\n'));
        }, isProduction ? 0 : 250);

        function polyfill(test, scriptSrc) {
          if (!test) document.write('<script class="polyfill" src="' + scriptSrc + '"></'+'script>');
        }

        polyfill('Promise' in window, '//s3.amazonaws.com/es6-promises/promise-1.0.0.js');
        polyfill('assign' in Object, './object-assign-polyfill.js');
      }());
    </script>

    <script src="./main.js"></script>
  </body>
</html>

<!DOCTYPE html>

<html>
  <head>
    <meta charset="utf-8" />
    <title>Panoptes</title>
    <link rel="stylesheet" href="./main.css" />
    <link rel="stylesheet" href="//fonts.googleapis.com/css?family=Montserrat:400,700" />
    <link rel="stylesheet" href="//fonts.googleapis.com/css?family=Playfair+Display:700" />
    <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css" />
  </head>

  <body>
    <script>
        function polyfill(test, scriptSrc) {
          if (!test) document.write('<script class="polyfill" src="' + scriptSrc + '"></'+'script>');
        }

        polyfill('Promise' in window, '//s3.amazonaws.com/es6-promises/promise-1.0.0.js');
        polyfill('assign' in Object, './object-assign-polyfill.js');
      }());
    </script>

    <script src="./main.js"></script>
  </body>
</html>

Load fonts like a normal person
Load fonts like a normal person
