Fandom Developers Wiki
Advertisement
You may be looking for the similar AutoEditPages or FindAndReplace.

MassEdit is a script that enables users to create a set of inputted pages or edit/delete/find-and-replace content from a set of individual pages, categories, or namespaces. It can affix templates to the top or bottom of articles, add categories to pages, remove or replace all instances of a word or phrase, or create new articles. Users can adjust the rate of edit at will through the addition of a window object.

Due to the potential for abuse in the form of vandalism or spam, the script can only be used by high-level local staff (i.e. admins, content-moderators, and bots).

Installation

Configuration

Users may further configure the script through the addition of a window object denoting their preferences. Users may adjust the edit rate of the script by modifying the integer value of editInterval. An example config object is shown below.

window.massEditConfig = {
    editInterval: 1500
};
Variables Type Default value(s)
editInterval Integer 1000

General usage

In addition to the standard usage of the "prepend" and "append" options to edit content of existing pages, these options may be used interchangeably to create a set of new pages based on the inputted values of the pages text area. Selecting either option and inputting page titles of nonexistent pages creates these pages automatically, allowing for a quick and efficient means of publishing new articles from a template or text extract.

Furthermore, though the find-and-replace function may be used as intended to locate and replace wikitext, HTML, or plaintext from existing articles, it may also be used to remove content from pages. Leaving the "New Content" field blank is counted as an empty string, allowing for the removal of the content of the "Target Content" field from the articles in question.

It is important to note that the script does not account for case sensitivity in the find-and-replace function. Upper and lowercase variations of the same word or phrase are treated separately and will require multiple iterations to replace as needed. In future, it is possible that a case sensitivity option will be added as per FindAndReplace's precedent.

Users are also provided with the ability to edit/delete/replace content from pages in a set of inputted categories. Selecting the "Categories" dropdown option and including the names of the categories in the textarea edits all extant pages currently in the category. (Note: Category titles may be included as Category:Example Category or simply as Example Category.)

In addition to the above category-based editing, users may also edit pages belonging to certain legitimate namespaces, separating individual namespace numbers (0 for main namespace, 4 for Project namespace, etc.) by line breaks, as per standard usage instructions.

In either case, a total of 500 page members (5000 for bots) will be edited per namespace or category, as per standard API limits for allpages and categorymembers queries.

Changelog

05-02-17
Initial revision
06-02-17
Revision of regex, removal of character limit
18-12-17
Retrofitting of I18n-js, addition of "find-and-delete" option, addition of config options, cleanup
07-01-18
Addition of find-and-replace function for set of pages; improved/expanded error handling for nonexistent pages, empty input fields, and pages without target text; general cleanup
12-04-18
Addition of category-based editing/find-and-replace function
17-04-18
Addition of namespace-based editing/find-and-replace function
24-05-18
Removal of static config-based edit summary in favor of modal-based summary textbox; assorted cosmetic and improper input behavior fixes
Advertisement