User:V111P/js/What Links Here link filter

What Links Here link filter adds an additional filter on What Links Here pages allowing you to, in effect, exclude pages linking to the page through a given navigation template. This works, because navigation templates include a link to themselves in their top left conrner. (A script removing all pages transcluding a given template can also easily be created if it's needed.) Keep in mind that the removed pages may also include a link to the page outside of that template.

The script also adds a link allowing you to view up to 5000 pages at a time (next to the links for 20, 50, 100, 250, and 500 pages).

''You can edit this page. If I don't like or understand something you wrote, I will correct it.'' ;)

Installation
Copy the following code to your common.js:

How to use it
On the "What Links Here" special page:
 * 1) First you must enter a page name in the Page text input box, but that's prefilled for you if you went there through the "What links here" link in the Toolbar. For testing purposes, you can try for example Wichita Falls, Texas
 * 2) You may want to select Namespace: Page instead of the default all. Then press  next to it, which should give you.
 * 3) Click the 5000 link to show a maximum of 5000 links on the page (this is the maximum allowed at the moment), which should give you.
 * 4) Finally, in the Filters section, next to the text Hide pages linking to:, enter a page name (most likely you want to enter a template name, in which case you need to include the Template: prefix as well) and press Go. The pages linking to that page will be removed from the list of links on the page. If your JavaScript console is open at the moment (try the F12 key) you will see how many links are being removed from the page and how many are remaining. You can repeat this step several times with different pages, or you can enter multiple pages in the field at the same time, just separate them with a vertical bar, for example:
 * 5) If more than 5000 pages are linking to the page, click the "next 5,000" link and repeat steps 4 and 5 to see the remaining links.