MassRenameRevert adds buttons and a checkbox to each entry on the move log to open revert links quickly. Due to MediaWiki limitations, it is not possible to revert them conventionally with API like a normal page move by the user, so this is the closest you can get to accomplishing that. The purpose of this script is to mass revert renaming (usually by a particular user) in cases of extreme move vandalism.
Note: The script will not auto-detect if a page exists or not in languages other than English.
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:
By default, all entries are checked. To check specific ones, either press the "Uncheck All" button and select the ones you want to open or uncheck manually. Pressing the "Unchecked All" button will also cause it to change to a "Check All" button, and will revert if pressed again etc.
When the "Open Moves" button is pressed, all lines with the checkboxes checked will open the "revert" links in new separate tabs ready to revert them to their old page names.
It is possible your browser will not open them, in which case you will need to enable popups on that wiki in your browser settings.
Note: In this example, pay close attention to the placement of commas and other punctuation. For people who aren't familiar with programming (and even those who are!), a common mistake when writing code is to accidentally delete, forget, or misplace critical symbols like commas or quotation marks. This can cause a syntax error that breaks the code. Carefully follow the convention shown here when using importArticles.