Skip to content

Instantly share code, notes, and snippets.

@awrowse
Created October 5, 2012 20:21
Show Gist options
  • Save awrowse/3842143 to your computer and use it in GitHub Desktop.
Save awrowse/3842143 to your computer and use it in GitHub Desktop.
include autoload.js on mobile pages
<html lang="#rn:language_code#">
<head>
<meta name="viewport" content="width=device-width; initial-scale=1.0; minimum-scale=1.0; maximum-scale=1.0; user-scalable=no;"/>
<meta charset="utf-8"/>
<title><rn:page_title/></title>
<rn:theme path="/euf/assets/themes/mobile" css="site.css"/>
<rn:head_content/>
<link rel="icon" href="images/favicon.png" type="image/png">
<?php
/* Manually include autoload.js
* (it won't be automatically included if js module == mobile_may_10 */
if(IS_OPTIMIZED): ?>
<script type="text/javascript" src="<?=getOptimizedAssetsDir();?>custom/autoload.js"></script>
<?php else:
$this->clientLoader->addJavaScriptInclude('/javascript/autoload.js', 'custom');
endif;
?>
</head>
<body>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment