Skip to content

Instantly share code, notes, and snippets.

@mk0x9
Created February 11, 2014 10:11
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mk0x9/8932264 to your computer and use it in GitHub Desktop.
Save mk0x9/8932264 to your computer and use it in GitHub Desktop.
<!doctype html>
<html>
<head>
<title></title>
</head>
<body>
<script>
(function () {
if(/mobile/i.test(navigator.userAgent)) {
document.body.className += ' mobile';
} else {
var css = document.createElement('link');
css.rel = 'stylesheet';
css.href = 'animate.css';
document.getElementsByTagName('head')[0].appendChild(css);
}
}).call();
</script>
<script>
(function () {
if(!/(?:^|\s)mobile(?:$|\s)/.test(document.body.className)) {
var add_js = function (s_uri) {
var js = document.createElement('script');
js.src = s_uri;
js.setAttribute('async', '');
document.body.appendChild(js);
};
add_js('wow.js');
add_js('nprogress.js');
}
}).call();
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment