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.
Installation
Usage
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.
Examples:
| 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>}}
|
Configuration
The delete reason prompted by default is "spam", but it can be changed using the promptedDeleteReason variable. By default, the script appends the delete template but it can be changed to replace the page's content via the replace variable. Below is an example configuration:
window.MarkForDeletion = {
promptedDeleteReason: "Unused image",
replace: true
};
Using configuration options with Fandom Developers Wiki scripts
The instructions on this page describe how to use configuration options with a script. Here on the Fandom Developers Wiki, 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.
// 1. AjaxRC import statement
importArticles({
type: 'script',
articles: [
'u:dev:MediaWiki:AjaxRC.js'
]
});
// 2. AjaxRC configuration option
window.ajaxRefresh = 30000;
// 1. AjaxRC configuration option
window.ajaxRefresh = 30000;
// 2. AjaxRC import statement
importArticles({
type: 'script',
articles: [
'u:dev:MediaWiki:AjaxRC.js'
]
});
Changelog
- 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