User:StraussInTheHouse/relist.js

/*function { //make a button that says relist var relist = document.createElement('span'); relist.innerHTML = 'Relist'; //plop the button under the rm	var rm = document.querySelector('[id^="Requested_move"]').id; rm.after(relist);

//when the button is clicked append relisting template $( relist ).click( function {		var go = confirm('This will only work if there are no comments on the RM and the RM is on the final section of the page. See bot considerations.');		var params = {			action: 'edit',			title: mw.config.get("wgPageName"),			appendtext: '\{\{subst:relisting\}\}',			summary: 'Relisting RM using script.',			format: 'json'		};		if (go == true) {			api = new mw.Api;			api.postWithToken( 'csrf', params ).done( function ( data ) { //alert( data ); } );		}	}); }