User:Nardog/MoveHistory.js

$(function moveHistory {	if (!document.getElementById('p-tb')) return;	mw.loader.using('mediawiki.util', => { let clicked; mw.util.addPortletLink('p-tb', '#', 'Move history', 't-movehistory').firstElementChild.addEventListener('click', e => {			e.preventDefault;			if (clicked) {				if (window.moveHistoryDialog) window.moveHistoryDialog.open;				return;			}			clicked = true;			mw.loader.load('//en.wikipedia.org/w/index.php?title=User:Nardog/MoveHistory-core.js&action=raw&ctype=text/javascript');			mw.loader.using([ 'mediawiki.api', 'mediawiki.util', 'mediawiki.Title', 'oojs-ui-windows', 'oojs-ui-widgets', 'mediawiki.widgets', 'mediawiki.widgets.DateInputWidget', 'oojs-ui.styles.icons-interactions', 'mediawiki.interface.helpers.styles' ]);		});	}); });