Misplaced Pages

User:Xaosflux/monobook.js: Difference between revisions

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.
< User:Xaosflux Browse history interactively← Previous editNext edit →Content deleted Content added
Revision as of 15:36, 3 November 2022 view sourceXaosflux (talk | contribs)Edit filter managers, Autopatrolled, Bureaucrats, Importers, Interface administrators, Oversighters, Administrators83,933 edits casingTag: Reverted← Previous edit Revision as of 15:38, 3 November 2022 view source Xaosflux (talk | contribs)Edit filter managers, Autopatrolled, Bureaucrats, Importers, Interface administrators, Oversighters, Administrators83,933 edits backTag: Manual revertNext edit →
Line 5: Line 5:


//importScript('Misplaced Pages:WikiProject User scripts/Scripts/CloseAFD.js')// //importScript('Misplaced Pages:WikiProject User scripts/Scripts/CloseAFD.js')//

importScript('User:Xaosflux/inactive.js')


/////////////////////////////////////////// ///////////////////////////////////////////

Revision as of 15:38, 3 November 2022

///////////////////////////////////////////
// ]
//importScript('User:Writ Keeper/Scripts/massRollback.js');
///////////////////////////////////////////

//importScript('Misplaced Pages:WikiProject User scripts/Scripts/CloseAFD.js')//	

///////////////////////////////////////////
// MFD CLOSER
// closemfd.js - updated by ] with help from ] from code 
// written by ], modified from
// ] by ]
// and ] by ]
 
function automfd_result()
{
	var close = prompt("Result of debate?");
	var f = document.editform, t = f.wpTextbox1;
 
	t.value = "{{subst:" + "mfd top" + "|1='''" + close + "'''.|2=y}}" + "\n" + "\n" + t.value;
	if (t.value.length > 0)
	{
		t.value += '\n';
	}
	t.value += "{{subst:" + "mfd bottom" + "}}";
	f.wpSummary.value += "Closing debate; result was " + close + " (using ])";
}
 
function automfd_add_mfd_tabs()
{
	// Only add for pages with the right string somewhere in the title
	if ((document.title.indexOf("Editing Misplaced Pages:Miscellany for deletion/") != -1) && (document.title.indexOf("(section)") != -1))
	{
		mw.loader.using(  ).done( function() {
			var link = mw.util.addPortletLink('p-cactions', '', "close");
			$(link).click( function(e) {
				e.preventDefault();
				automfd_result();
			} );
		});
	}
}
 
$(automfd_add_mfd_tabs);