Fandom Developers Wiki
Advertisement

Ajax批次刪除是根據Splarka維基百科上由Grunny所改寫以利用jQuery來運作,並適用於Wikia及Monobook的外觀。新的版本由KnazO所寫並比早前的更功能化。

安裝方法[]

使用方法[]

在最下方工具欄上的「我的工具」會出現「批次刪除」這個選項。只需按下該連結,於表單中每一行輸入一個要刪除的頁面名稱(不是頁面的URL),並於上方輸入刪除原因,按下「開始」即會自動刪除大量頁面。程式會於刪除該列的頁面後自動刪除該列,並於遇到空白行列時自動停止。另外,使用者也可於執行中插入空白行列以提早停止此程式。

版本二提供刪除頁面後並自動加上「保護」的功能(選擇性),而且提供可以更改此程式的讀寫間隔。預設的間隔為1000微秒(1秒),如果想要變更的話,可以在腳本前加上「window.batchDeleteDelay」此參數(以微秒為單位)(請為他人及伺服器設想,設定至少保持間隔為1000微秒以上)
此版本也能讓使用者讀取分類中的頁面,並自動寫到表單內。

請注意:此功能僅限管理員、SOAP、員工、和助手使用

window.batchDeleteDelay = 100;

will lower the delete rate to 0.1 second.

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'
    ]
});

It also enables the user to grab a whole category's contents and puts them into the text area ready for deletion. Note that the script will only load if the user has access to the delete right (content moderator, administrator, SOAP, staff, or wiki-specialist).

Advertisement