Skip to content

Instantly share code, notes, and snippets.

@yvesvanbroekhoven
Created November 29, 2011 13:22
Show Gist options
  • Save yvesvanbroekhoven/1404795 to your computer and use it in GitHub Desktop.
Save yvesvanbroekhoven/1404795 to your computer and use it in GitHub Desktop.
Webtype async
<script type="text/javascript">
WebtypeConfig = {
kitId: 'd5d59de3-a6b0-4d6a-b7a2-405bead6519b',
scriptTimeout: 3000
};
(function(){var h=document.getElementsByTagName('html')[0];h.className+=' wt-loading';var t=setTimeout(function(){h.className=h.className.replace(/(\s|^)wt-loading(\s|$)/g,'');h.className+=' wt-inactive';},WebtypeConfig.scriptTimeout);var wt=document.createElement('link');wt.href='//cloud.webtype.com/css/'+WebtypeConfig.kitId+'.css';wt.type='text/css';wt.rel='stylesheet';wt.async='true';wt.onload=wt.onreadystatechange=function(){var rs=this.readyState;if(rs&&rs!='complete'&&rs!='loaded')return;clearTimeout(t);};var s=document.getElementsByTagName('script')[0];s.parentNode.insertBefore(wt,s);})();
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment