Skip to content

Commit

Permalink
feat: allow nbb to work with cloudflare rocket loader 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
psychobunny committed Sep 5, 2020
1 parent 53a5f15 commit 4d66595
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/views/partials/footer/js.tpl
Expand Up @@ -5,15 +5,20 @@
{{{end}}}

<script>
window.addEventListener('DOMContentLoaded', function () {
require(['forum/footer']);
if (document.readyState === 'loading') {
window.addEventListener('DOMContentLoaded', prepareFooter);
} else {
prepareFooter();
}
function prepareFooter() {
require(['forum/footer']);
<!-- IF useCustomJS -->
{{customJS}}
<!-- ENDIF useCustomJS -->
$(document).ready(function () {
ajaxify.coldLoad();
});
});
}
</script>

0 comments on commit 4d66595

Please sign in to comment.