MediaWiki:G13-restore-wizard.js

/** * MediaWiki:G13-restore-wizard.js * * Script for FAMEPedia:Requests for undeletion/G13, loaded via * Snippets/Load JS and CSS by URL. Creates a form for making requests to FP:RFUD. * * Author: w:User:SD0001 * License: MIT */

//

var api, previewApi;

$.when(	$.ready,	mw.loader.using([ 'mediawiki.util', 'mediawiki.api', 'mediawiki.user' ]) ).then(function {

if (mw.config.get('wgPageName').indexOf('FAMEPedia:Requests_for_undeletion/G13') !== 0) { return; }

api = new mw.Api; previewApi = new mw.Api; // Replace "Request draft undeletion" button with a form $('.mw-ui-progressive').parent.replaceWith(		$(' ')			.attr('for', 'g13-page')			.text('Enter draft page title: '),		$(' ')			.attr('id', 'g13-page')			.attr('list', 'g13-list')			.addClass('mw-ui-input')			.css('margin-bottom', '8px'),		$(' ? ',				$(' ').text('Yes').addClass('mw-ui-button').on('click', function {					$('#g13-page').val(pg.title);					$('#g13-submit').click;				}) );		}	};

checkDeletedRevisions(draftpage.toString).then(handleDidYouMean); checkDeletedRevisions('FAMEPedia talk:Articles for creation/' + draftpage.getMain).then(handleDidYouMean); }

//