User:Mikevoir/sandbox.js

$(function {   // Load dependencies and cache	var config = mw.config.get(['wgDiffNewId', 'wgAction', 'wgPageName']);	var mapGenerator = {		init: function {			// Clean page			document.querySelectorAll('#mw-content-text.mw-body-content > p').forEach(function(p){ p.remove; });			document.querySelector('h1.page-header__title').innerHTML = 'Map Generator';			document.title = 'Map Generator';			var container = $('  ');			container.find('#mapImage').resizable;			container.draggable;			$('#mw-content-text.mw-body-content').append(container);			mw.util.addCSS('\n'+ '.container.ui-draggable > .ui-wrapper, #mapImage {\n'+ 'width: auto !important;\n'+ 'height: '+(screen.height-100)+'px !important;\n'+ '}'			);		}	};	if (config.wgPageName == 'Special:Map') {		mapGenerator.init;	} });