Skip to content

Bits and pieces

Stuff I collect because it’s interesting, but has to be organized.

Script to add mobile usage to the body class (WordPress)

<script type="text/javascript">
 if(navigator.userAgent.match(/(Android|iPod|iPhone|iPad|BlackBerry|IEMobile|Opera Mini)/)) { document.body.className += " using-mobile-browser "; }
</script>

Leave a Reply

Your email address will not be published.