Fandom Developers Wiki
Advertisement

AjaxBatchDelete基于由Splarka维基百科上写的一个脚本。此代码已由Grunny被重写为jQuery。

安装[]

使用方法[]

使用批量删除脚本的选项将显示在“我的工具”列表下。

要删除一批页面,只需在表单中添加页面名称(不是页面URL),每个页面名称都在新行上,然后继续删除它们并设置原因。脚本将在到达空行时停止,并且可以通过清空要删除的剩余页面列表来提前终止。

它还具有在删除后保护页面的功能(这是可选的),以及从任何页面上的模式加载,并可以选择修改删除/保护的速率。如果要修改每 1000 毫秒(1 秒)删除一次的默认速率,请在使用自己的数字(以毫秒为单位)导入脚本之前添加配置 window.batchDeleteDelay。例如,使用:

window.batchDeleteDelay = 100;

将删除速率降低到 0.1 秒。

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

它还使用户能够抓取整个类别的内容,并将它们放入准备删除的文本区域中。请注意,仅当用户有权访问删除权限(内容版主、管理员、SOAP、员工、维基专家或维基代表)时,脚本才会加载。

Advertisement