dev

Linksweeper removes backlinks (links, templates, files, and categories) from pages listed in special pages such as Special:WantedPages, Special:WhatLinksHere, and Special:WantedFiles. It also allows clean-up of links entered in the dialog box.

Important Note: Be careful when cleaning up categories. Due to the way links are created this script will also remove categories from pages, and not just their links (needs a fix at some point), e.g. [[:Category:Sweepy]].

Installation

Configuration

linkSweepConfirmation = true;
LinkSweeperDelay = 1000;

Features

Instructions

Click "remove backlinks" button on Special:WantedPages or Special:Whatlinkshere. One can also change some script settings by putting the options before the importArticles:

window.linkSweepConfirmation = true; 
window.linkSweeperDelay = 1000;
window.linkSweeperRedlist = {"wantedpages" : 1};
window.categoryList = [];

LinkSweepConfirmation adds a confirm dialog before attempting to remove the links, set true to show this dialog always. LinkSweeperDelay is the number of milliseconds before the next removal, this prevents flooding the wiki with too many requests.

The category allows users to add custom categories to fetch links to clean, e.g.:

window.categoryList = ["myfavcat", "spam"]

The LinkSweeperRedlist consists of pages where the link sweeper will show up the to help remove links. It can be configured to work in additional special pages by adding the canonical name of a special page. However, it has only been tested with the default special pages (the ones below), and may not work in others. To use this configuration add each name as in the example below (canonical name in quotes, followed by colon and "1", followed by a comma):

window.linkSweeperRedlist = {
      "wantedpages": 1,
      "whatlinkshere": 1,
      "wantedfiles": 1,
      "listredirects": 1,
      "uncategorizedpages": 1
}

Completely removing a link

By default the scripts only removes the square brackets from the link. However, there is a checkbox "delete links?" that enables a more aggressive mode, and completely removes the link from a page:

Notes

Changelog

May 2, 2016
Added button to fetch all redlinks in a page and improved template detection.
April 16, 2016
Added custom list of categories to fetch pages.
April 1, 2016
Added support for cleaning templates, added category button, button for batch removal in special pages.
March 17, 2016
Added support for cleaning links in galleries.
March 16, 2016
Added support for removing many links at once, added show backlinks button.
March 12, 2016
Added Link to Wikia oasis skin (mytools) and "?action=delete".
March 10, 2016
Bug fix (normalize page titles: compare spaces, colon trick.
March 9, 2016
Bug fixes and new features (arbitrary link page, custom summary, support for Special:Wantedfiles, namespace, delete & de-link).
March 5, 2016
Initial commit.
Text above can be found here (edit)