Custom javascript in WriteFreely 0.81

I managed to sneak my analytics JS code into the end of the Custom CSS box by ending the </style> tag, adding the JS and then opening another <style> tag.

e.g.

/* custom CSS */
</style>

<!-- Fathom - simple website analytics - https://github.com/usefathom/fathom -->
<script>
(function(f, a, t, h, o, m){
	a[h]=a[h]||function(){
		(a[h].q=a[h].q||[]).push(arguments)
	};
	o=f.createElement('script'),
	m=f.getElementsByTagName('script')[0];
	o.async=1; o.src=t; o.id='fathom-script';
	m.parentNode.insertBefore(o,m)
})(document, window, '//fathom.domain.com/tracker.js', 'fathom');
fathom('set', 'siteId', 'ABCDE');
fathom('trackPageview');
</script>
<!-- / Fathom -->

<style type="text/css">
/* closed by the code which injects the custom CSS */
4 Likes