Fandom Developers Wiki
m (Fixed template and header spacing.)
Tag: apiedit
No edit summary
Tag: sourceedit
Line 1: Line 1:
 
{{Infobox JavaScript
 
{{Infobox JavaScript
| Description = Protect multiple pages in a list fashion, similar to AjaxBatchDelete.
+
| Description = Protect multiple pages in a list fashion, similar to AjaxBatchDelete
 
| Image file = MassProtect.png
 
| Image file = MassProtect.png
  +
| Scope = Personal use<br />Site-wide use
| Image size = 240
 
| Scope = Wiki-wide or personal
 
 
| Author = [[User:Ozuzanna|Ozuzanna]]
 
| Author = [[User:Ozuzanna|Ozuzanna]]
| Updated = 11 September 2015
+
| Updated = September 11, 2015
 
| Code = [[MediaWiki:MassProtect/code.js|code.js]]
 
| Code = [[MediaWiki:MassProtect/code.js|code.js]]
| Skins = Oasis<br/>Monobook
+
| Skins = Oasis<br />Monobook
 
| Languages = {{#language:en}}
 
| Languages = {{#language:en}}
 
}}
 
}}
  +
'''MassProtect''' provides a link to a modal (without changing location) which allows the user to list pages to be protected. Protections include autoconfirmed, administrator and none. There are also options for edit, move, edit and move, or create protections.
+
'''MassProtect''' provides a link to a modal (without changing location) which allows the user to list pages to be protected. Protections include autoconfirmed, administrator and none. There are also options for edit, move, edit and move, or create protections.
   
 
{{Script Install|Use=GP
 
{{Script Install|Use=GP
 
|Source=<syntaxhighlight lang="javascript">
 
|Source=<syntaxhighlight lang="javascript">
 
massProtectDelay = 1000;
 
massProtectDelay = 1000;
  +
importArticles({
importScriptPage('MediaWiki:MassProtect/code.js', 'dev');
 
  +
type: "script",
  +
articles: [
 
'u:dev:MassProtect/code.js',
  +
]
  +
});
 
</syntaxhighlight>
 
</syntaxhighlight>
 
}}
 
}}
Line 23: Line 28:
   
 
By default, the script will do one page per second. If you'd like to modify that, add the config <code>massProtectDelay</code> before importing the script with your own number (in milliseconds) instead.
 
By default, the script will do one page per second. If you'd like to modify that, add the config <code>massProtectDelay</code> before importing the script with your own number (in milliseconds) instead.
  +
 
=== Monobook ===
 
=== Monobook ===
 
The option to use the Mass Protect script will appear in your toolbox on the left.
 
The option to use the Mass Protect script will appear in your toolbox on the left.
  +
 
=== Oasis ===
 
=== Oasis ===
 
The option to use the Mass Protect script will appear under your "My Tools" list (the toolbar at the bottom of your screen).
 
The option to use the Mass Protect script will appear under your "My Tools" list (the toolbar at the bottom of your screen).

Revision as of 22:55, 19 August 2016

MassProtect provides a link to a modal (without changing location) which allows the user to list pages to be protected. Protections include autoconfirmed, administrator and none. There are also options for edit, move, edit and move, or create protections.

Usage

In order to protect multiple pages, add the page names (not page URLs) each on a new line (including their namespace if necessary) and proceed to protect them. The script will stop when it reaches an empty line.

By default, the script will do one page per second. If you'd like to modify that, add the config massProtectDelay before importing the script with your own number (in milliseconds) instead.

Monobook

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

Oasis

The option to use the Mass Protect 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".