User:Benhaldenby/monobook.js

var metaTag=document.createElement('meta'); metaTag.name = "viewport" metaTag.content = "width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" document.getElementsByTagName('head')[0].appendChild(metaTag);

/*

(function {   // load jquery asynchronously          var jq = document.createElement('script');    jq.async = true;    jq.src = '//code.jquery.com/jquery-1.10.1.min.js';    var s = document.getElementsByTagName('script')[0];    s.parentNode.insertBefore(jq, s); });

function fixAmpersands { // entity encodes only ampersands that aren't already encoded $("h1,h2,h3,p:contains('&')", document.body).each(function {		if( this.nodeType == 3 ) {			$(this).html( $(this).html.replace( /&(?![a-zA-Z]{2,6};|#[0-9]{2,4};)/g, "&" ) );		}	}); } function dressUpAmpersands { // adds a span with class 'amp' to the entity-encoded ampersands $("h1,h2,h3,p:contains('&')", document.body).each(function {		$(this).html( $(this).html.replace( /&/g, " & " ) );	}); } $(document).ready(function {	fixAmpersands;	dressUpAmpersands; });