summaryrefslogtreecommitdiffstats
path: root/secret.html
blob: 6e12aaca28bec43d55a0265e461f12a518868ac2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>FFFFALLBACK</title>
  <style type="text/css" media="screen">
    body {
      color:#444;
      font: normal normal normal 1em/1.5 'Helvetica Neue', Arial, Helvetica, sans-serif;
    }

    h2 {
      font-family: 'lucida grande';
    }
  </style>
</head>
<body>
  <hgroup>
    <h1>FFFFALLBACK</h1>
    <h2>A simple tool for bulletproof web typography.</h2>
  </hgroup>
  <p>Shhhh! This is top secret. Grab the bookmarklet and take it for a spin. Please send any and all feedback to me at <a href="mailto:josh@jbrewer.me">feedback@ffffallback.com</a></p>
  <p>This is the bookmarklet: <a id="bookmarklet" href="#">ffffallback</a>&mdash;drag it to your bookmarks bar and brace yourself for an onslaught of unicorns and rainbows.</p>
  <script>
    var myURL = window.location.toString();
    if(myURL.indexOf('#') >= 0) {
      myURL = myURL.split('#')[0];
    }
    var baseURL;
    if(myURL.match(/\.html$/)) {
      var urlChunks = myURL.split('/');
      baseURL = urlChunks.slice(0, urlChunks.length - 1).join('/')
    } else {
      baseURL = myURL;
    }
    if(baseURL.substring(myURL.length - 1) !== '/') {
      baseURL += '/';
    }
    var jsURL = baseURL + 'bookmarklet/ffffallback.js?r=' + Math.random();
    var cssURL = baseURL + 'bookmarklet/ffffallback.css?r=' + Math.random();
    var bookmarkletSource = 'javascript:' +
"(function() {\
  var scriptTag = document.createElement('script');\
  scriptTag.setAttribute('src', '" + jsURL + "');\
  var linkTag = document.createElement('link');\
  linkTag.setAttribute('href', '" + cssURL + "');\
  linkTag.setAttribute('rel','stylesheet');\
  document.body.appendChild(scriptTag);\
  document.body.appendChild(linkTag);\
})();".replace(/\n/g, ' ');

    document.getElementById('bookmarklet').setAttribute('href', bookmarkletSource);
  </script>
  <script type="text/javascript">

    var _gaq = _gaq || [];
    _gaq.push(['_setAccount', 'UA-109790-10']);
    _gaq.push(['_trackPageview']);

    (function() {
      var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
      ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
      var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
    })();
  </script>

</body>
</html>