Support customHTML/customJS (#380)

* nodebb/nodebb#5980

- Introduced customHTML field
- Moved customJS to footer

* switched to using defer only for scripts in footer, nodebb/nodebb#5980
main
Julian Lam 7 years ago committed by GitHub
parent 47429db8a6
commit c62aedbaf6

@ -16,15 +16,19 @@
</div>
</div>
<script async src="{relative_path}/assets/nodebb.min.js?{config.cache-buster}"></script>
<script defer src="{relative_path}/assets/nodebb.min.js?{config.cache-buster}"></script>
<!-- BEGIN scripts -->
<script async defer type="text/javascript" src="{scripts.src}"></script>
<script defer type="text/javascript" src="{scripts.src}"></script>
<!-- END scripts -->
<script>
window.addEventListener('load', function () {
require(['forum/footer']);
<!-- IF useCustomJS -->
{{customJS}}
<!-- ENDIF useCustomJS -->
});
</script>

@ -16,12 +16,12 @@
};
</script>
<!-- IF useCustomJS -->
{{customJS}}
<!-- ENDIF useCustomJS -->
<!-- IF useCustomHTML -->
{{customHTML}}
<!-- END -->
<!-- IF useCustomCSS -->
<style type="text/css">{{customCSS}}</style>
<!-- ENDIF useCustomCSS -->
<!-- END -->
</head>
<body class="{bodyClass} skin-{config.bootswatchSkin}">

Loading…
Cancel
Save