User:InvalidOS/TestOnTestWiki

var config = {};

config.mw = mw.config.get( [	'wgPageName',	'wgUserGroups',	'wgCurRevisionId',	'wgPageTitle',	'wgServer' ] );

if (config.mw.wgUserGroups.includes('sysop') | config.mw.wgUserGroups.includes('oversight')) {	mw.loader.using(['mediawiki.util']), mw.util.addPortletLink(		'p-views',		'javascript:revDelCurrent(config.mw.wgCurRevisionId)',		'RevDelC',		'ca-revdel-current',		'Delete Current Revision',		'-',		document.getElementById('ca-history')	); }

function revDelCurrent(curRevisionId) {	location.replace = config.mw.wgServer + '/w/index.php?title=' + config.mw.wgPageTitle.replace(' ', '_') + '&action=edit'; document.getElementById('wpTextbox1').value += ''; document.getElementById('wpSummary').value = 'Null edit to allow previous revision to be deleted'; document.getElementById('wpMinoredit').checked = true; document.getElementById('editform').submit; location.replace = config.mw.wgServer + '/wiki/Special:RevisionDelete' + curRevisionId; }