DeleteUserpage, kullanıcının katkı sayfasındaki kullanıcı sayfasını silmek için bir düğme ekler.
Installation
Configuration
Betiğini yapılandırmak için window.DeleteUserpage nesnesinde aşağıdaki anahtarları ayarlayabilirsiniz:
| Ad | Tür | Ne yapar |
|---|---|---|
noConfirm
|
boole | Kullanıcı sayfasını silmek/korumak için bir onay alıp almadığınızı kontrol eder |
deleteReason
|
dize | Özel silme nedeni |
protectReason
|
dize | Custom protection reason |
reason
|
dize | Söz konusu bireysel eylem için özel bir neden ayarlanmamışsa hem koruma hem de silme için kullanılan özel neden |
protect
|
boole | Silme işleminden sonra kullanıcı sayfasının korumasını etkinleştirmek için geçiş yapın, sayfayı koruma seçeneğini elde etmek için true olarak ayarlanması gerekir |
expiry
|
dize | Özel koruma uzunluğu |
İşte yukarıdaki değişkenleri kullanan betiğinin örnek bir yapılandırması:
window.DeleteUserpage = {
noConfirm: true,
protect: true,
deleteReason: 'spam',
protectReason: 'spam',
expiry: '1 hafta'
}
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.
Configuration options load too late, don't work
// 1. AjaxRC import statement
importArticles({
type: 'script',
articles: [
'u:dev:MediaWiki:AjaxRC.js'
]
});
// 2. AjaxRC configuration option
window.ajaxRefresh = 30000;
Proper placement of configuration options
// 1. AjaxRC configuration option
window.ajaxRefresh = 30000;
// 2. AjaxRC import statement
importArticles({
type: 'script',
articles: [
'u:dev:MediaWiki:AjaxRC.js'
]
});