DeleteUserpage додає на сторінку внеску користувача клавішу, що дозволяє легко вилучити його сторінку.
Installation
Configuration
Щоб налаштувати скрипт, ви можете змінити значення таких параметрів об'єкта window.DeleteUserpage:
| Назва | Тип | Призначення |
|---|---|---|
noConfirm
|
логічний | Визначає, чи буде вам необхідно підтвердити вилучення або захист сторінки користувача |
deleteReason
|
рядок | Дає вказати свою причину вилучення |
protectReason
|
рядок | Дає вказати свою причину захисту від створення |
reason
|
рядок | У випадку, якщо для вилучення або захисту окремо не вказана причина, буде використаний текст цього параметра |
protect
|
логічний | Якщо встановлений на true, скрипт захистить сторінку після її вилучення
|
expiry
|
рядок | Дає вказати свою тривалість захисту |
Нижче наведений приклад налаштування скрипта з використанням раніше згаданих параметрів:
window.DeleteUserpage = {
noConfirm: true,
protect: true,
deleteReason: 'спам',
protectReason: 'спам',
expiry: '1 week'
}
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'
]
});