Fandom Developers Wiki
No edit summary
Tag: sourceedit
(I think?)
Tag: rte-source
Line 24: Line 24:
 
Or, just put the original code into [[MediaWiki:Group-sysop.js]].
 
Or, just put the original code into [[MediaWiki:Group-sysop.js]].
   
  +
== Installation ==
 
{{Script Install|Use=GP
 
{{Script Install|Use=GP
 
|Source=<syntaxhighlight lang="javascript">
 
|Source=<syntaxhighlight lang="javascript">
Line 29: Line 30:
 
massRenameSummary = 'automatic'; // Optional
 
massRenameSummary = 'automatic'; // Optional
 
importScriptPage('MediaWiki:MassRename/code.js', 'dev');
 
importScriptPage('MediaWiki:MassRename/code.js', 'dev');
  +
</syntaxhighlight>
  +
<syntaxhighlight lang="javascript">
  +
importArticles({
  +
type: "script",
  +
articles: [
  +
//...
  +
'u:dev:AjaxBatchDelete/code.2.js'
  +
//...
  +
]
  +
});
 
</syntaxhighlight>
 
</syntaxhighlight>
 
}}
 
}}

Revision as of 15:54, 16 July 2017

MassRename provides a link to a modal (without changing location) which allows the user to list pages to be moved.

Note: If this script is installed wiki-wide, it is strongly recommended to enclose the import statement in an if statement which will only let certain usergroups load the script. An example for the sysop (administrator) usergroup is shown below:

if (mw.config.get("wgUserGroups").indexOf('sysop') > -1) {
  massRenameDelay = 1000;
  massRenameSummary = 'automatic';
  importScriptPage('MediaWiki:MassRename/code.js', 'dev');
}

Or, just put the original code into MediaWiki:Group-sysop.js.

Installation

Usage

Each line is split into two (by finding the space) where the first half is the page that we want to move from, and the second half is the page to move to. So for example if you wanted to move Foo to Bar in one line, you would put "Foo Bar". For pages that contain spaces, you need to use underscores to rename them (e.g. "Page_One Page_Two" would move "Page One" to "Page Two").

By default, the script will rename one page per second. If you'd like to modify that, add the config massRenameDelay before importing the script with your own number (in milliseconds) instead, as shown in the script install example. As well as this, the default edit summary is "automatic" - if you'd like to add that, add the config massRenameSummary before importing the script with your own summary, as shown in the script install example.

It is strongly recommended that you are using an account that has a bot flag when using this script excessively, as excessive renaming can flood the recent changes/wiki activity.

Monobook

The option to use the Mass Rename script will appear in your toolbox on the left.

Oasis

The option to use the Mass Rename script will appear under your "My Tools" list (the toolbar at the bottom of your screen).

Please note you must not have the toolbar at the bottom hidden or the script will not function. If you do not see the "My Tools" (or other language equivalent), try clicking Customize and then "reset defaults" to not hide the "My Tools".