User:MWang (WMF)/global.js

// Load my own volunteer stylesheet // mw.loader.load( //	"//meta.wikimedia.org/w/index.php?title=User:Neil_P._Quinn/global.css&action=raw&ctype=text/css", //	"text/css" // );

/*************************************** PLACE A BORDER AROUND ALL PAGES ( function( $ ) { // Confine use of $ to this scope

var viewportOverlay;

var sizeOverlay = function sizeOverlay { viewportOverlay.css( 		{ width: window.innerWidth	, height: window.innerHeight		} 	); };

var drawOverlay = function drawOverlay { $( "body" ).append( " " ); viewportOverlay = $( "#viewport-overlay" ).css( 		{ "position": "fixed"	, "top": 0		, "left": 0		, "box-sizing": "border-box"		, "pointer-events": "none"		, "border": "4px solid red"		, "z-index": "250"		} 	);

sizeOverlay; };

var resizeTimer;

$( document ).ready( drawOverlay ); $( window ).resize( function {	clearTimeout( resizeTimer );	resizeTimer = setTimeout( sizeOverlay, 100); } );

} )( jQuery ); // End of scope confinement