User:SD0001/G13-restore-wizard2.js

/** * MediaWiki:G13-restore-wizard.js * * Script for Requests for undeletion/G13, loaded via * Snippets/Load JS and CSS by URL. Creates a form for making requests to WP:RFUD. * * Author: 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('Wikipedia: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(		$(' ').append( $(' ')				.attr('for', 'g13-page') .text('Enter draft page title: '), $(' ')				.attr('id', 'g13-page') .attr('list', 'g13-list') .attr('size', '60') .css('margin-bottom', '8px') .val(mw.util.getParamValue('page') || '') ),		$(' ? ',				$(' ').text('Yes').addClass('mw-ui-button').on('click', function {					$('#g13-page').val(pg.title);					$('#g13-submit').click;				}) );		}	};

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

//