diff options
| author | tekkub <tekkub@gmail.com> | 2011-03-06 03:52:57 -0700 |
|---|---|---|
| committer | tekkub <tekkub@gmail.com> | 2011-03-06 03:52:57 -0700 |
| commit | 3ec91806feeea47390ec0d2481bd945f1a252613 (patch) | |
| tree | ddeba42de79a1702041fb92ccabc9ecec80158b3 /_layouts | |
| parent | 8431916e74a6db1d2bf7dee8139d43173a11b98c (diff) | |
DRY up OS-specific redirections too
Diffstat (limited to '_layouts')
| -rw-r--r-- | _layouts/os_redirect.html | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/_layouts/os_redirect.html b/_layouts/os_redirect.html new file mode 100644 index 0000000..c7985aa --- /dev/null +++ b/_layouts/os_redirect.html @@ -0,0 +1,20 @@ +--- +layout: default +--- + +<p> + Attempting to redirect to the guide for your OS. + If the redirect fails, pick your OS: +</p> + +<ul> + <li><a href="{{ page.redirect_win }}">Windows</a></li> + <li><a href="{{ page.redirect_mac }}">Mac</a></li> + <li><a href="{{ page.redirect_linux }}">Linux</a></li> +</ul> + +<script type="text/javascript"> + if (navigator.appVersion.indexOf("Win") != -1) {window.location = '{{ page.redirect_win }}'} + else if (navigator.appVersion.indexOf("Mac") != -1) {window.location = '{{ page.redirect_mac }}'} + else if (navigator.appVersion.indexOf("X11") != -1 || navigator.appVersion.indexOf("Linux") != -1) {window.location = '{{ page.redirect_linux }}'} +</script> |
