The MarkForDeletion script automates the process of adding {{delete|<your delete reason>}} to a page to mark it for deletion. Note: This script does not actually delete a page, it just automatically edits it to add the delete template. Presumably, the delete template would then have categorized the page so that an admin can go through and delete it later.



MarkForDeletion creates a "Mark for deletion" link in your toolbar at the bottom of the page.

Clicking the "Mark for deletion" link will prompt you to enter a delete reason. The reason prompted by default is "spam", but you can change it to something else if you want (see the Configuration section below).

After entering the delete reason, press OK to automatically edit the page and mark it for deletion. Or press cancel to abort the process.


Delete reason Edit made to page
spam {{delete|spam}}
Unused image {{delete|Unused image}}
speedy=true|reason=bad image {{delete|speedy=true|reason=bad image}}
<reason> {{delete|<reason>}}


The delete reason prompted by default is "spam", but it can be changed to (for example) "Unused image" by copy/pasting the following code into your global.js in addition to the normal installation of the script:

// MarkForDeletion customization, see
window.MarkForDeletion = {
    promptedDeleteReason: "Unused image"

Of course, "Unused image" is just an example, you can make it anything you want.

Using configuration options with FANDOM Open Source Library scripts

The instructions on this page describe how to use configuration options with a script. Here on the FANDOM Open Source Library, many scripts provide optional configuration settings as a mean to alter or enhance the default behavior of the script. When installing configuration options in your JavaScript file, please note that they need to go above the import statement in order to work — unless the directions say otherwise. In case MediaWiki:ImportJS is used to load the scripts, it will be executed last.

Configuration options load too late, don't work
// 1. AjaxRC import statement
// 2. AjaxRC configuration option
var ajaxRefresh = 30000;
Proper placement of configuration options
// 1. AjaxRC configuration option
var ajaxRefresh = 30000;
// 2. AjaxRC import statement


29 September 2016
Mark for Deletion button no longer shows up for people that can delete pages.
15 August 2016
KockaAdmiralac changed the code so it uses jQuery methods more, added translation support, merged the already existent Polish translation into it and added Serbian translation
5 January 2013
Mathmagician simplified code per TK's suggestion at MediaWiki talk:MarkForDeletion/code.js.
27 December 2012
Mathmagician added user configuration option for changing default prompt from "spam" to anything else.
26 December 2012
Mathmagician created script, per request of Paleclaw