User:L10nM4st3r/Template Remover

From Uncyclopedia, the content-free encyclopedia
Jump to navigation Jump to search
What it typically looks like while in use.

This is an automated script for removing templates from use.


Installing[edit | edit source]

To use this tool, you first need to add it to your personal javascript page the following code: mw.loader.load('//en.uncyclopedia.co/w/index.php?title=User:L10nM4st3r/Template_Remover.js&action=raw&ctype=text/javascript') // Linkback [[User:L10nM4st3r/Remplate_Remover.js]];.

To use this tool, you require to either be an admin, or ask for permission to use the tool. This tool has real capacity to be very dangerous in the wrong hands, making edits faster than any human could.

You can ask either L10nM4st3r, or any admin to add you to the list.



For the admins trying to add people to the list: to add a user to the list, edit this page and put in the username of the person to be added to the list. (Make sure that it doesn't have the "User:" prefix, and if the username contains any double quotes ("), to place a backslash (\) before those.) Make sure to wrap the username in double quotes, and to end the line with a comma, like this: "Example",.


Usage[edit | edit source]

Currently the tool is hard-coded to not allow for configuring what templates it can remove, as this will come soon, this will be left blank for now.


Running the tool[edit | edit source]

There are 2 ways to run the tool. Visit any page, and at the top is a button that says "Remove configured templates from page". Pressing that button will remove all the configured templates from the page you are currently viewing.

However, visiting each page one at a time to remove the templates takes a very long time, and I know this. So if you instead visit any page with the Template: prefix, you will have 2 extra buttons.

TemplateRemoverTool-MenuTop.png

The first new button ("Scan template pages that link here") will check every template page that links to the template that you are currently viewing. It is recommended you do this first, so that editing these templates will cause any page that uses those templates no be marked as not having them when they eventually do get around to being edited.

The third and final button is the same as the one above, but will search every page that uses this template, to see if it can remove it. One quirk about how wikis works, if you edit the templates first, you then need to go over all the articles afterwards, so that they will update which templates are used in them.

The "Automatically continue when done batch" checkbox is very useful. When using the tool, it will get up to 50 pages to check at a time. Once it has gone through all 50 of those pages, it will get the next 50 pages, as long as the checkbox is checked. If it is not, you will have to manually decide to get the next 50 pages. Make sure you press the same button or it will reset your counter, and you will have to start from the beginning again. Although this isn't much of an issue when you consider that pages get removed from the list of you do remove the template from that page. So you won;t have to wait nearly as long to get to pages that actually do need editing.

Finally, the stop button. This will stop searching for templates immediately. Useful if you are trying to edit on another tab, but keep hitting rate limits. By pressing on the same scan button as before, you can freely resume where you left off.


TemplateRemoverTool-Done.png


Once you get a message like this, make sure to click the scan all pages button. And then do that until Special:WhatLinksHere of the page in question is empty, just to make sure everything is gone. After that, you can add the template to QVFD. Or just delete it yourself if you happen to be an admin.

If for some reason the WhatLinksHere doesn't get any smaller, make sure to also check for redirects, and to remove those as well.

Source Code[edit | edit source]

The script can be found here.